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)

defect

Tracking

(firefox57 fix-optional)

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.
Mentor: odvarko
Keywords: good-first-bug
Priority: -- → P3
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.
Flags: needinfo?(odvarko)
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.
(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
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.
Product: Firefox → DevTools

Hey! It would be great if I get to contribute to this issue. Could you please assign it to me?
Thank you
Dhruvi

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.