Closed
Bug 1473220
Opened 6 years ago
Closed 6 years ago
"Open in New Tab" under Developer Toolbar\Network doesn't send same content type
Categories
(DevTools :: Netmonitor, defect, P3)
Tracking
(firefox64 fixed)
RESOLVED
FIXED
Firefox 64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: omidmr, Assigned: glowka.tom)
References
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0 Build ID: 20180627222831 Steps to reproduce: It doesn't work properly if content type of the request is "application/json". In my test case, I sent "{"email":"email@example.com","password":"text&with&ersand&in&it!"}" with "application/json" content type. But when I open it in a new tab, it will send "application/x-www-form-urlencoded" content type which will be interpreted as: {"email":"email@example.com","password":"text with ampersand in it!"}
Updated•6 years ago
|
Component: Untriaged → Netmonitor
Product: Firefox → DevTools
Comment 1•6 years ago
|
||
This is a follow up for bug 1407515 @Tom: what could be the problem here? Honza
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(glowka.tom)
Priority: -- → P3
Assignee | ||
Comment 2•6 years ago
|
||
Hey! So the current implementation of this feature looks very basic, we do not use the content type of the original request when opening the new tab, but explicitly and unconditionally set "application/x-www-form-urlencoded" for any POST request. This is the exact line: https://hg.mozilla.org/mozilla-central/file/tip/devtools/client/netmonitor/src/utils/firefox/open-request-in-tab.js#l33 Maybe we should extend it to support more (any?) content types by utilizing content type from original request? Or at least support the "application/json" case, which this bug is about and seems to be most popular case. I could take that bug as soon as I have new shape of this feature defined :)
Flags: needinfo?(glowka.tom) → needinfo?(odvarko)
Comment 3•6 years ago
|
||
(In reply to Tom Glowka from comment #2) > Maybe we should extend it to support more (any?) content types by utilizing > content type from original request? Yes, I think this is the best way to go. > I could take that bug as soon as I have new shape of this feature defined :) Let me know if I should assign it to you. Thanks, Honza
Flags: needinfo?(odvarko)
Assignee | ||
Comment 4•6 years ago
|
||
(In reply to Jan Honza Odvarko [:Honza] from comment #3) > Let me know if I should assign it to you. I'll be happy to take it. Please do!
Flags: needinfo?(odvarko)
Comment 5•6 years ago
|
||
Done, thanks for the help! Honza
Assignee: nobody → glowka.tom
Status: NEW → ASSIGNED
Flags: needinfo?(odvarko)
Assignee | ||
Comment 6•6 years ago
|
||
Before this change it was hardcoded to "application/x-www-form-urlencoded", now original type is simply forwarded.
Comment 7•6 years ago
|
||
Comment on attachment 9007099 [details]
Use original content-type when opening request in tab in Netmonitor
Jan Honza Odvarko [:Honza] has approved the revision.
Attachment #9007099 -
Flags: review+
Assignee | ||
Updated•6 years ago
|
Keywords: checkin-needed
Pushed by ebalazs@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0661deed0ac4 Use original content-type when opening request in tab in Netmonitor r=Honza
Keywords: checkin-needed
Comment 9•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0661deed0ac4
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
You need to log in
before you can comment on or make changes to this bug.
Description
•