ComputerGhost / FaviconFetcher

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

URIs that redirect to new domain text/html fail to find icon #23

Closed kiddailey closed 5 months ago

kiddailey commented 5 months ago

When scanned, some domains return what appears to be valid icon urls. For example, a scan of Microsoft's live.com returns two URIs:

But attempting to download images at those URLs redirects to a new domain, which resolves to a text/html document:

https://www.microsoft.com/en-us/microsoft-365/outlook/email-and-calendar-software-microsoft-outlook?deeplink=%2fowa%2f&sdf=0

This results in the icon fetch failing. If you scan and fetch a second time on that redirected path, you can see that the new domain does have a valid icon and works.

This actually looks like a bug or a regression in DownloadImages, so it should be fairly simple to fix.

kiddailey commented 5 months ago

Ah - whoops. I was looking at the wrong code. This was an issue with the new HttpClient branch, not the mainline. Will include fix as part of the async/httpclient pull request