Compare commits

..

1 commit

Author SHA1 Message Date
c0846c56fe api: unify http precondition handling
All checks were successful
ci/woodpecker/push/debug Pipeline was successful
ci/woodpecker/pr/debug Pipeline was successful
2025-02-19 18:14:27 +01:00

View file

@ -828,7 +828,7 @@ impl PreconditionHeaders {
}
} else if let Some(ius) = &self.if_unmodified_since {
// Step 2: if-unmodified-since is present, and if-match is absent
if v_date > ius {
if v_date > *ius {
return Ok(Some(StatusCode::PRECONDITION_FAILED));
}
}
@ -840,7 +840,7 @@ impl PreconditionHeaders {
}
} else if let Some(ims) = &self.if_modified_since {
// Step 4: if-modified-since is present, and if-none-match is absent
if v_date <= ims {
if v_date <= *ims {
return Ok(Some(StatusCode::NOT_MODIFIED));
}
}