Images with incorrect mime-type won't appear when Network is filtered with "Images"
Categories
(DevTools :: Netmonitor, defect, P3)
Tracking
(firefox94 fixed)
Tracking | Status | |
---|---|---|
firefox94 | --- | fixed |
People
(Reporter: rajatjain.ix, Assigned: colin.cazabet)
Details
(Keywords: good-first-bug)
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Steps to reproduce:
I have a website that lazy loads webP images.
Actual results:
When I goto Inspect Element -> Network Tab -> Apply Images filter.
No webP image shows up but on applying "All" filter they show up.
Expected results:
Expected: On applying "Images" filter in Network Tab of Inspect Element,
webP images should also appear.
Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•5 years ago
|
||
Thanks for reporting Rajat!
Do you have a good website we can test on?
I can't seem to reproduce.
See the screenshot for what is see
Thanks
Reporter | ||
Comment 3•5 years ago
|
||
Yes, Please visit:
http://dev.wakefit.co
If not, then any of its sub sites.
Thanks
Comment 4•5 years ago
|
||
Looks like the images are served with binary/octet-stream
(misconfigured S3?) and don't hit the image/
mime-type detection. In this case the browser does seem to ignore the mime-type but depend on mine sniffing.
Interestingly, some fonts are also loaded as octet-stream
but work as the extension is right (src).
Would it be useful to extend the filter with also testing cause
(as in mimetype ~= image-ish OR cause ~= image-ish
); so anything loaded via font
or img/imageset
is also included in the right category? I don't see any major downsides, but maybe I am missing something.
Comment 5•5 years ago
|
||
Harald ,
i agree!
We could extend to maybe something like
--- a/devtools/client/netmonitor/src/utils/filter-predicates.js
+++ b/devtools/client/netmonitor/src/utils/filter-predicates.js
@@ -53,8 +53,12 @@ function isFont({ url, mimeType }) {
);
}
-function isImage({ mimeType }) {
- return mimeType && mimeType.includes("image/");
+function isImage({ cause, mimeType }) {
+ return (
+ (mimeType &&
+ mimeType.includes("image/")) ||
+ (cause.type.includes("img") || cause.type.includes("image"))
+ );
}
Reporter | ||
Comment 6•5 years ago
|
||
If this is the only change needed, maybe I can do and raise a PR?
Comment 7•5 years ago
|
||
Sure go for it.
Let me know if you need any help.
Updated•5 years ago
|
Reporter | ||
Comment 8•5 years ago
|
||
Thank you very much.
I would need a couple of days to understand architecture of NetMonitor before I make a commit. :)
Reporter | ||
Comment 9•5 years ago
|
||
I think I will pass this.
This requires heavy knowledge of React/Redux as well as NodeJS.
I thought it is built in some other engine.
Comment 10•4 years ago
|
||
This good-first-bug hasn't had any activity for 6 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 11•3 years ago
|
||
Hello, could you please assign this bug to me, i'm going to try to fix it.
Thank you,
Colin
Assignee | ||
Comment 13•3 years ago
|
||
Comment 14•3 years ago
|
||
Comment 15•3 years ago
|
||
Backed out changeset 329f9ecbad12 (Bug 1654257) for causing mochitest failures on browser_net_brotli.js.
Backout link
Push with failures - dt4
Failure Log
Comment 16•3 years ago
|
||
Comment 17•3 years ago
|
||
bugherder |
Assignee | ||
Updated•3 years ago
|
Description
•