eval_preconditions

Macro eval_preconditions 

Source
macro_rules! eval_preconditions {
    ( $etag: expr, $headers: expr ) => { ... };
}
Expand description

Given an $etag (Entity Tag) value and $headers (an instance of a type that handles HTTP request headers), check that the If-XXX pre- conditions when present, pass.

Return an HTTP Status that describes the result. Specifically…

  • Ok: if pre-conditions where absent, or were present but passed,
  • PreconditionFailed: if pre-conditions were present and failed.