From 06f05fec734d1bf76ffa0d7ef38e263a1c4a2978 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Mon, 29 Jul 2024 13:39:24 -0400 Subject: [PATCH] Increase `If-Modified-Since` tolerance even more (#169) Signed-off-by: Juan Cruz Viotti --- src/httpserver/request.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/httpserver/request.cc b/src/httpserver/request.cc index 70eaaa26..7ea44fbc 100644 --- a/src/httpserver/request.cc +++ b/src/httpserver/request.cc @@ -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