Skip to content

Commit

Permalink
Increase If-Modified-Since tolerance even more (#169)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored Jul 29, 2024
1 parent 9af3480 commit 06f05fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/httpserver/request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ auto ServerRequest::header_if_modified_since(

// Time comparison can be flaky, but adding a bit of tolerance leads
// to more consistent behavior.
return (if_modified_since.value() + std::chrono::milliseconds(1)) <
return (if_modified_since.value() + std::chrono::seconds(1)) <
last_modified;
// If there is an error parsing the `If-Modified-Since` timestamp, don't
// abort, but lean on the safe side: the requested resource has been
Expand Down

0 comments on commit 06f05fe

Please sign in to comment.