limit the number of favicon retries

This commit is contained in:
Athou
2026-05-23 11:16:55 +02:00
parent 055d503862
commit 03eb09c68c
2 changed files with 12 additions and 4 deletions

View File

@@ -30,9 +30,10 @@ public class RootFaviconFetcher implements FaviconFetcher {
url = feed.getUrl();
}
URI uri = URI.create(url);
String faviconUrl = "%s://%s/favicon.ico".formatted(uri.getScheme(), uri.getHost());
try {
URI uri = URI.create(url.trim());
String faviconUrl = "%s://%s/favicon.ico".formatted(uri.getScheme(), uri.getHost());
log.debug("getting root icon at {}", faviconUrl);
HttpResult result = getter.get(faviconUrl);
return new Favicon(result.content(), result.contentType());