Closed
Bug 667533
Opened 14 years ago
Closed 14 years ago
Display application/json data as text
Categories
(Core :: General, enhancement)
Core
General
Tracking
()
RESOLVED
FIXED
mozilla8
People
(Reporter: liam, Assigned: mstange)
References
Details
Attachments
(1 file, 1 obsolete file)
6.83 KB,
patch
|
Details | Diff | Splinter Review |
When loading a URL with MIME type application/json, Firefox should display it as plain text instead of offering to download the file.
Reproducible: Always
Steps to Reproduce:
Load a URL containing JSON data served with application/json MIME type.
Actual Results:
Firefox offers to download the file.
Expected Results:
Firefox displays the JSON as plain text.
A patch to fix this in in bug #606488
![]() |
||
Updated•14 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 1•14 years ago
|
||
This is the same patch as in bug 606488, but also contains a test. I'm only requesting review on the test. I'm not sure that I'm not making any wrong assumptions there. For example, is it safe to assume that plain text documents have a document and a body?
![]() |
||
Comment 2•14 years ago
|
||
Comment on attachment 549818 [details] [diff] [review]
v1
Yeah, it's safe to assume that. The web depends on it, and the HTML5 spec requires that behavior.
Attachment #549818 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 3•14 years ago
|
||
Attachment #549818 -
Attachment is obsolete: true
Attachment #549828 -
Flags: checkin?
Assignee | ||
Comment 4•14 years ago
|
||
Whiteboard: [inbound]
Assignee | ||
Updated•14 years ago
|
Attachment #549828 -
Flags: checkin?
Comment 5•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
Comment 6•12 years ago
|
||
Is there some central way of detecting whether a MIME type is text based rather than patching all over the place (e.g. bug 882995 was recently filed to "catch up")?
My best idea is to look at the document - if it's a MediaDocument then you probably don't want to allow View Source on it, while if it's XUL or SVG then you probably don't want to FAYT either.
You need to log in
before you can comment on or make changes to this bug.
Description
•