* make sure to keep ETag at least as long as cached data

This commit is contained in:
Reinhard Pointner 2013-11-21 08:52:55 +00:00
parent 0101915567
commit 2040417f57
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ public abstract class ETagCachedResource<T extends Serializable> extends CachedR
Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>();
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)));
}