mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-20 14:33:04 +01:00
Fix bug getting Dr. Drang’s favicon.
This commit is contained in:
parent
9865bd8e51
commit
8425e9033b
@ -28,7 +28,15 @@ struct FaviconURLFinder {
|
||||
return
|
||||
}
|
||||
|
||||
let link = faviconURL(homePageURL, data)
|
||||
// Use the absoluteString of the response’s URL instead of the homePageURL,
|
||||
// since the homePageURL might actually have been redirected.
|
||||
// Example: Dr. Drang’s feed reports the homePageURL as http://www.leancrew.com/all-this —
|
||||
// but it gets redirected to http://www.leancrew.com/all-this/ — which is correct.
|
||||
// This way any relative link to a favicon in the page’s metadata
|
||||
// will be made absolute correctly.
|
||||
|
||||
let urlToUse = response.url?.absoluteString ?? homePageURL
|
||||
let link = faviconURL(urlToUse, data)
|
||||
callback(link)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user