Skip to main content

check_if_match

Function check_if_match 

Source
pub fn check_if_match(if_match: &str, current_etag: &str) -> bool
Expand description

Check an If-Match header value against an ETag.

Returns true if the precondition is met (the resource matches and the request should proceed). Returns false if a 412 Precondition Failed should be returned.

Uses strong comparison (W/ weak ETags never match).