pub fn apply_conditional(
request_headers: &[(String, Vec<u8>)],
method: &Method,
response: Response,
) -> ResponseExpand description
Evaluate conditional request headers against a response and return the appropriate response (304, 412, or the original).
This checks If-None-Match (for GET/HEAD) and If-Match (for PUT/PATCH/DELETE)
against the response’s ETag header.
§Arguments
request_headers- Iterator of (name, value) pairs from the requestmethod- The HTTP methodresponse- The prepared response (must have ETag header set)
§Returns
Either the original response or a 304/412 response as appropriate.