Closed Bug 1614115 Opened 5 years ago Closed 5 years ago

Update Doc: Server response headers are all lowercase except X-Firefox-Spdy

Categories

(DevTools :: Netmonitor, defect)

68 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

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.

If this is HTTP/2, then this is a duplicate of bug 1539423.

Component: Untriaged → Netmonitor
OS: Linux → Unspecified
Product: Firefox → DevTools
Hardware: x86_64 → Unspecified
Summary: Network console deliberately garbles response headers, even with "Raw headers" slider on, sending people on wild goose chases. WTF? → Server response headers are all lowercase
Summary: Server response headers are all lowercase → Server response headers are all lowercase except X-Firefox-Spdy

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?

: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
Flags: needinfo?(odvarko)

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:

@michal: Do you know why is X-Firefox-Spdy an exception here?

Honza

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(odvarko) → needinfo?(michal.novotny)
Keywords: dev-doc-needed
Summary: Server response headers are all lowercase except X-Firefox-Spdy → Update Doc: Server response headers are all lowercase except X-Firefox-Spdy

(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.

Flags: needinfo?(michal.novotny)

I filed MDN documentation bug.
https://github.com/mdn/sprints/issues/2841

Closing this report

Honza

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.