Update Doc: Server response headers are all lowercase except X-Firefox-Spdy
Categories
(DevTools :: Netmonitor, defect)
Tracking
(Not tracked)
People
(Reporter: mozilla, Unassigned)
References
Details
(Keywords: dev-doc-needed)
Recently, I was trying to debug a new server config, and saw that the header I set was mysteriously getting lower cased.
Suspecting a bug in Apache's mod_headers, I googled this and found: http://apache-http-server.18135.x6.nabble.com/why-does-quot-Header-set-quot-send-lower-case-header-names-td5006069.html
Suspecting that network console was actually garbling the server's output, I clicked "raw headers", but it still showed up as lower case.
Eventually I found https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor/request_details and saw that this was deliberate. "If you noticed that the keys in the response header are all in lowercase, while the request headers keys are not, that is by design.". It didn't contain any explanation why this strange design decision was taken, however.
Just how pathetic can you get? The Developer Tools Network Console is supposed to be a debugging tool, and not introduce its own bugs, er... features! And if you have a "raw headers" slider, please at least make sure that this switches off all garbling.
... and strangely enough, the X-Firefox-Spdy header is unaffected (i.e. is shown with proper case).
Please fix this childish header garbling, and make this "opt-in" for those people who explicitly want to lose their time in this way.
Comment 1•5 years ago
|
||
If this is HTTP/2, then this is a duplicate of bug 1539423.
Updated•5 years ago
|
Reporter | ||
Comment 2•5 years ago
|
||
Oops, indeed. Problem only occurs in HTTP/2 (everything shows up "as sent" (mixed case) if network.http.spdy.enabled.http2 is false).
However I still think that it would be useful to add a more detailed explanation to that text box on https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor/request_details. Maybe a link to another page that explains what is going on?
Comment 3•5 years ago
•
|
||
:honza,
- Why is X-Firefox-Spdy an exception here?
- In bug 1539423, comment 7 you said the aforementioned MDN article should be updated, but "that is by design" doesn't actually provide an explanation. Maybe "that's in accordance with RFC7540, section 8.1.2" instead?
- Since it's not possible to move reports to the Developer Documentation component in Bugzilla anymore, is there any place to file MDN content bugs now? (developer.mozilla.org :: Wiki pages isn't it) Edit: https://github.com/mdn/sprints/issues
Comment 4•5 years ago
|
||
Summary of this bug:
The following page already contains a note about why response headers are all in lowercase:
"If you noticed that the keys in the response header are all in lowercase, while the request headers keys are not, that is by design."
https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor/request_details
It would be great to extend the note and mention the following:
- In http/2 all response headers are in small case.
- See: https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor/request_details#Headers
- RFC: https://tools.ietf.org/html/rfc7540#section-8.1.2
@michal: Do you know why is X-Firefox-Spdy an exception here?
Honza
Comment 5•5 years ago
|
||
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #4)
@michal: Do you know why is X-Firefox-Spdy an exception here?
That's not a header sent by the server. We add it at https://searchfox.org/mozilla-central/rev/b1e51ad5613ad3d911cf42e3e525885ce2278915/netwerk/protocol/http/Http2Stream.cpp#1084.
Comment 6•5 years ago
|
||
Updated•5 years ago
|
Description
•