Closed Bug 667533 Opened 14 years ago Closed 14 years ago

Display application/json data as text

Categories

(Core :: General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: liam, Assigned: mstange)

References

Details

Attachments

(1 file, 1 obsolete file)

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
See Also: → 606488
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch v1 (obsolete) — Splinter Review
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?
Assignee: nobody → mstange
Status: NEW → ASSIGNED
Attachment #549818 - Flags: review?(bzbarsky)
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+
Attached patch with commit msgSplinter Review
Attachment #549818 - Attachment is obsolete: true
Attachment #549828 - Flags: checkin?
Attachment #549828 - Flags: checkin?
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
Depends on: 788995
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.

Attachment

General

Created:
Updated:
Size: