return the correct media type for favicons (fix #736)

This commit is contained in:
Athou
2015-06-08 15:53:09 +02:00
parent 18a7bd1fd1
commit 101602c6f6
6 changed files with 34 additions and 22 deletions

View File

@@ -26,7 +26,7 @@ public class FacebookFaviconFetcher extends AbstractFaviconFetcher {
private final HttpGetter getter;
@Override
public byte[] fetch(Feed feed) {
public Favicon fetch(Feed feed) {
String url = feed.getUrl();
if (!url.toLowerCase().contains("www.facebook.com")) {
@@ -54,9 +54,9 @@ public class FacebookFaviconFetcher extends AbstractFaviconFetcher {
}
if (!isValidIconResponse(bytes, contentType)) {
bytes = null;
return null;
}
return bytes;
return new Favicon(bytes, contentType);
}
private String extractUserName(String url) {