ComputerGhost / FaviconFetcher

Scan a webpage for favicons, or just easily download the one you want.
MIT License
5 stars 3 forks source link

Crash when attempting to download favicon.ico from caniuse.com #28

Closed kiddailey closed 5 months ago

kiddailey commented 5 months ago

Note: This is specific to the SVG support branch.

When attempting to fetch from caniuse.com, an null exception occurs when trying to get the bitmap of the default favicon.ico provided by the site. Their other variations (128px) work fine.

The issue appears to be because the site does not have a favicon.ico file but is intercepting that request as if it is a search on the site, redirecting to search results page for "favicon.ico." This ends the fetch with a text/html return type.

At this point the ico isn't loading and requesting a bitmap causes it to fail.

kiddailey commented 5 months ago

I've added a check for this and will submit with the SVG support PR. This was actually a regression caused by the ImageSize.Scaleable using 0 for identification, Added a null check for good measure and changed the scaleable size to use -1 instead.

kiddailey commented 5 months ago

This was resolved with PR #29.