Dev tools: Opening XHR request in new tab forwards request data but not request headers
Categories
(Core :: DOM: Networking, enhancement)
Tracking
()
People
(Reporter: mitya, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0
Steps to reproduce:
- Open dev tools
- Filter to XHR
- Load any webpage that fires an XHR request that includes some sort of request header e.g. authorization, cookie
- In the requests list, right click on the request and choose "Open in new tab"
Actual results:
The request opens in a new tab, complete with request payload, but some headers (e.g. those mentioned above) are not sent. This can result in an XHR request being successfully authorised, but the new-tab variant UNauthorised because of the missing header(s). This can make it hard to debug web service endpoints.
Expected results:
All request headers from the XHR should have been forwarded, in the same way that all POST, FILES etc. params for the payload are forwarded.
Comment 1•3 years ago
|
||
Hi,
Could you please send the link to the page on which you've came across this issue?
Thanks!
I've just set up a repro environment here:
https://mitya.uk/bugzilla/index.html
Make sure you have devtools open when you load the page (or refresh it after opening devtools).
See the single request. It sends a request header, Authorization. The response is told to spit out all incoming headers. Authorization is absent. Another custom header being passed, OtherHeader, does show up.
The request URI is programmed thus:
<?php
print_r(getallheaders());
My apologies - I may be wasting your time here. I've just realised the Authorization header doesn't show up in the output even when run as an XHR, never mind as a new tab.
So whatever is preventing this header from displaying in output is presumably not a FF bug. Probably PHP stripping out or something, or some other thing pertaining to my ignorance.
Comment 6•3 years ago
|
||
I'm going to go ahead and close it then.
Thanks for the update!
Description
•