Developer Tools show original response headers, without modifications by extensions
Categories
(DevTools :: Netmonitor, defect, P3)
Tracking
(Not tracked)
People
(Reporter: jscher2000, Unassigned)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0
Steps to reproduce:
Install my extension https://addons.mozilla.org/firefox/addon/content-type-fixer/
Load my test page https://www.jeffersonscher.com/res/badct/
Open Network Monitor and Browser Console
Then try the first or second link on the page (returns zip file).
Actual results:
Network Monitor main display shows the Content-Type value was correctly overridden to application/pdf
Headers panel for the request shows the original Content-Type header value of text/plain
The headers shown in the Browser Console or Web Console similarly show the original Content-Type header value of text/plain
Expected results:
It would be more helpful if the headers showed the values after modifications by extensions. This could be a change from earlier versions, but I have not run a mozregression.
Reporter | ||
Comment 1•5 years ago
|
||
Firefox 60.7.0esr (Portable Edition) is the same, so probably not a regression.
(mozregression was difficult to test with extensions due to Armagadd-on 2.0, so I gave up on that)
Updated•5 years ago
|
Updated•5 years ago
|
Comment 2•5 years ago
|
||
The priority flag is not set for this bug.
:Honza, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 3•4 years ago
|
||
Is it true that there is no way to view the actual/effective headers (in my case a CSP header that is changed by multiple extensions) in the DevTools?
I don't understand @jscher2000's comment:
Network Monitor main display shows the Content-Type value was correctly overridden to application/pdf
in my Developer Tools > Network tab, the original HTTP headers from the server are shown, not the "correctly overridden" ones.
You can see response headers including those modified by extension in about:cache?storage=disk
For example if you open this url http://textfiles.com/images/textfile.gif
You can see here both original and after modifying by extension response headers: about:cache-entry?storage=disk&context=&eid=&uri=http://textfiles.com/images/textfile.gif
Since it gets cached you have to click refresh while holding shift key to avoid cache after modifying by extension that example url.
Example rule I used in extension Header Editor:
name: textfiles
rule type: Modify response header
match type: URL
match rules: http://textfiles.com/images/textfile.gif
Execute type: normal
header name: last-modified
header value: Wed, 10 Nov 2020 03:46:28 GMT
Now this is shown in about:cache-entry?storage=disk&context=&eid=&uri=http://textfiles.com/images/textfile.gif
original-response-headers: Date: Mon, 05 Jul 2021 11:02:35 GMT
Server: Apache/2.4.37 (FreeBSD) OpenSSL/1.0.2o-freebsd
Last-Modified: Wed, 10 Nov 1999 03:46:28 GMT
ETag: "e7f-358ee5560cd00"
Accept-Ranges: bytes
Content-Length: 3711
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: image/gif
response-head: HTTP/1.1 200 OK
Date: Mon, 05 Jul 2021 11:02:35 GMT
Server: Apache/2.4.37 (FreeBSD) OpenSSL/1.0.2o-freebsd
ETag: "e7f-358ee5560cd00"
Accept-Ranges: bytes
Content-Length: 3711
Content-Type: image/gif
Last-Modified: Wed, 10 Nov 2020 03:46:28 GMT
Notice the difference in last-modified. Of course in network monitor only original are displayed.
Updated•2 years ago
|
Description
•