mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
Merge pull request #1747 from flisk/patch-1
don't throw NotModifiedException on etag/lm changes
This commit is contained in:
@@ -139,14 +139,7 @@ public class HttpGetter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String lastModifiedHeader = response.getLastModifiedHeader();
|
String lastModifiedHeader = response.getLastModifiedHeader();
|
||||||
if (lastModifiedHeader != null && lastModifiedHeader.equals(request.getLastModified())) {
|
|
||||||
throw new NotModifiedException("lastModifiedHeader is the same");
|
|
||||||
}
|
|
||||||
|
|
||||||
String eTagHeader = response.getETagHeader();
|
String eTagHeader = response.getETagHeader();
|
||||||
if (eTagHeader != null && eTagHeader.equals(request.getETag())) {
|
|
||||||
throw new NotModifiedException("eTagHeader is the same");
|
|
||||||
}
|
|
||||||
|
|
||||||
Duration validFor = Optional.ofNullable(response.getCacheControl())
|
Duration validFor = Optional.ofNullable(response.getCacheControl())
|
||||||
.filter(cc -> cc.getMaxAge() >= 0)
|
.filter(cc -> cc.getMaxAge() >= 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user