Closed Bug 1388335 Opened 7 years ago Closed 7 years ago

Content-type with +json is treated as binary file, firefox is not rendering as json instead asking to download

Categories

(DevTools :: JSON Viewer, defect, P3)

55 Branch
defect

Tracking

(firefox57 fix-optional, firefox58 fixed)

RESOLVED FIXED
Firefox 58
Tracking Status
firefox57 --- fix-optional
firefox58 --- fixed

People

(Reporter: santoshjram, Assigned: Oriol)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Steps to reproduce:

Send content-type as application/vnd.api+json or any other content type with suffix +json - according to rfc6839 (firefox 55 in mac 10.12.6)


Actual results:

firefox will prompt for downloading the file


Expected results:

As per https://tools.ietf.org/html/rfc6839#section-3.1 - this should be rendered as json....chrome is treating it promptly.
Component: Untriaged → Developer Tools: JSON Viewer
I already suggested load the JSON Viewer for all +json suffixes in bug 1384842 comment 1.
I did not know rfc6839, it makes even more sense with that.
This would fix bug 1384842 and bug 1258906.
Blocks: 1384842, 1258906
Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: normal → enhancement
Priority: -- → P3
Is there some way to access to original content type in the content process? The code would be simpler with this.
Assignee: nobody → oriol-bugzilla
Status: NEW → ASSIGNED
Comment on attachment 8921079 [details]
Bug 1388335 - Load JSON Viewer for all application/*+json content types.

https://reviewboard.mozilla.org/r/192058/#review198522

> Is there some way to access to original content type in the content process? The code would be simpler with this.

I don't know (you can ask on IRC #developers), but the patch looks ok to me.
R+ assuming try is green
Honza
Attachment #8921079 - Flags: review?(odvarko) → review+
(In reply to Jan Honza Odvarko [:Honza] from comment #6)
> I don't know (you can ask on IRC #developers), but the patch looks ok to me.

OK, let's fix this first, and if there is some way the code can be simplified in another bug.
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/21ed15658978
Load JSON Viewer for all application/*+json content types. r=Honza
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/21ed15658978
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Depends on: 1422527
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: