Open
Bug 1397966
Opened 9 years ago
Updated 3 years ago
JSON Viewer does not load for empty JSON documents
Categories
(DevTools :: JSON Viewer, defect, P3)
DevTools
JSON Viewer
Tracking
(firefox57 fix-optional)
NEW
| Tracking | Status | |
|---|---|---|
| firefox57 | --- | fix-optional |
People
(Reporter: Oriol, Unassigned, Mentored)
Details
Load data:application/json,
Result: blank document
Expected: JSON Viewer complaining about unexpected end of data
I guess it's because getMIMETypeFromContent is defined as
> Given a chunk of data, determines a MIME type.
So if there is no data, the method does not run.
Updated•9 years ago
|
| Reporter | ||
Comment 1•9 years ago
|
||
Is this really a good first bug? It would require changing the nsIContentSniffer with something else that exposes a method like getMIMETypeFromContent but that does not require content. I'm not sure if there is such a thing. Another alternative would be modifying nsIContentSniffer itself. Both cases need some knowledge.
Updated•9 years ago
|
Flags: needinfo?(odvarko)
Comment 2•9 years ago
|
||
Hi Honza,
I am interested in giving this issue a try. However I couldn't understand where exactly I would need to make changes.
Some pointers would be appreciated.
Comment 3•9 years ago
|
||
(In reply to Oriol Brufau [:Oriol] from comment #1)
> Is this really a good first bug? It would require changing the
> nsIContentSniffer with something else that exposes a method like
> getMIMETypeFromContent but that does not require content. I'm not sure if
> there is such a thing. Another alternative would be modifying
> nsIContentSniffer itself. Both cases need some knowledge.
@Oriol thanks for the analysis, removing the flag then.
(In reply to Abhinav Koppula from comment #2)
> Hi Honza,
> I am interested in giving this issue a try. However I couldn't understand
> where exactly I would need to make changes.
> Some pointers would be appreciated.
Sure, but see the comment #1, sounds like not good first bug.
Let me know if you are still interested and I can assign this one to you.
Honza
Flags: needinfo?(odvarko)
Keywords: good-first-bug
Comment 4•8 years ago
|
||
I think nsHttpChannel needs to do something like this:
https://searchfox.org/mozilla-central/source/netwerk/base/nsBaseChannel.cpp#848
But necko team also wants nsHttpChannel to use nsBaseChannel itself. So not sure if the code should just be copied for now or not.
Updated•8 years ago
|
Product: Firefox → DevTools
Comment 5•7 years ago
|
||
Hey! It would be great if I get to contribute to this issue. Could you please assign it to me?
Thank you
Dhruvi
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•