From 2040417f57182a7fdf0124edac8e61d5bacb9d72 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 21 Nov 2013 08:52:55 +0000 Subject: [PATCH] * make sure to keep ETag at least as long as cached data --- source/net/sourceforge/filebot/web/ETagCachedResource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net/sourceforge/filebot/web/ETagCachedResource.java b/source/net/sourceforge/filebot/web/ETagCachedResource.java index 98daaf26..7a998446 100644 --- a/source/net/sourceforge/filebot/web/ETagCachedResource.java +++ b/source/net/sourceforge/filebot/web/ETagCachedResource.java @@ -36,7 +36,7 @@ public abstract class ETagCachedResource extends CachedR Map> responseHeaders = new HashMap>(); 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))); }