cache default (missing) favicon too

This commit is contained in:
Athou
2014-10-26 18:13:09 +01:00
parent fa4bfa729d
commit 358a6029a1
4 changed files with 20 additions and 10 deletions

View File

@@ -324,13 +324,7 @@ public class FeedREST {
Feed feed = subscription.getFeed();
byte[] icon = feedService.fetchFavicon(feed);
ResponseBuilder builder = null;
if (icon == null) {
String baseUrl = FeedUtils.removeTrailingSlash(config.getApplicationSettings().getPublicUrl());
builder = Response.status(Status.MOVED_PERMANENTLY).location(URI.create(baseUrl + "/images/default_favicon.gif"));
} else {
builder = Response.ok(icon, "image/x-icon");
}
ResponseBuilder builder = Response.ok(icon, "image/x-icon");
CacheControl cacheControl = new CacheControl();
cacheControl.setMaxAge(2592000);