Fails to optimize favicon of about:robots
Categories
(Toolkit :: Places, defect, P3)
Tracking
()
People
(Reporter: daisuke, Unassigned)
References
Details
(Whiteboard: [favicons-2024][sng])
User Story
Investigate why the channel in some case may be lying to us, when it should instead use a media sniffer. Write a test serving a png as ico. Though, maybe the problem is limited to the chrome:// protocol. It may be worth fixing bug 1556396 first.
I found this while fixing bug 1894633.
Now, optimizing favicon of about:robots is failed. I investigated a bit, it happens from nsICODecoder::ReadHeader.
It seems that the reason is that despite the file extension of favicon chrome://browser/content/robot.ico is ico, the content is PNG.
We might need to get the mime type not from the extension, but from the content.
Comment 1•2 years ago
|
||
The severity field is not set for this bug.
:mak, could you have a look please?
For more information, please visit BugBot documentation.
Comment 2•2 years ago
|
||
(In reply to Daisuke Akatsuka (:daisuke) from comment #0)
It seems that the reason is that despite the file extension of favicon chrome://browser/content/robot.ico is ico, the content is PNG.
We pretty much trust the channel mimeType, so maybe the problem won't be severe for Web icons, while the http channel to the chrome:// protocol is likely to lie. Media has sniffers for image files, so it should be feasible, I'm not sure why it's not active here, maybe that sniffer is only enabled on loading the image or is somewhere else in the channel.
Though, about:robots is a local favicon, thus it should not be stored nor optimized, why it happens?
I think that's related to bug 1556396.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 3•2 years ago
|
||
I think this is similar to bug 1903721, we may just use the content mime also for the chrome and resource protocols.
Description
•