Merge pull request #1747 from flisk/patch-1

don't throw NotModifiedException on etag/lm changes
This commit is contained in:
Jérémie Panzer
2025-04-04 11:18:57 +02:00
committed by GitHub

View File

@@ -139,14 +139,7 @@ public class HttpGetter {
}
String lastModifiedHeader = response.getLastModifiedHeader();
if (lastModifiedHeader != null && lastModifiedHeader.equals(request.getLastModified())) {
throw new NotModifiedException("lastModifiedHeader is the same");
}
String eTagHeader = response.getETagHeader();
if (eTagHeader != null && eTagHeader.equals(request.getETag())) {
throw new NotModifiedException("eTagHeader is the same");
}
Duration validFor = Optional.ofNullable(response.getCacheControl())
.filter(cc -> cc.getMaxAge() >= 0)