mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-16 14:25:02 -05:00
* make sure to keep ETag at least as long as cached data
This commit is contained in:
parent
0101915567
commit
2040417f57
@ -36,7 +36,7 @@ public abstract class ETagCachedResource<T extends Serializable> extends CachedR
|
|||||||
Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>();
|
Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>();
|
||||||
ByteBuffer data = WebRequest.fetch(url, requestParameters.size() > 0 ? -1 : lastModified, requestParameters, responseHeaders);
|
ByteBuffer data = WebRequest.fetch(url, requestParameters.size() > 0 ? -1 : lastModified, requestParameters, responseHeaders);
|
||||||
|
|
||||||
if (data != null && responseHeaders.containsKey("ETag")) {
|
if (responseHeaders.containsKey("ETag")) {
|
||||||
getCache().put(new Element(etagKey, responseHeaders.get("ETag").get(0)));
|
getCache().put(new Element(etagKey, responseHeaders.get("ETag").get(0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user