Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headers now lowercase in Chrome 60 #31

Open
sylvainf911 opened this issue Aug 1, 2017 · 2 comments
Open

Headers now lowercase in Chrome 60 #31

sylvainf911 opened this issue Aug 1, 2017 · 2 comments

Comments

@sylvainf911
Copy link

With Chrome 60, I've been bitten by the fact that all headers names are now lowercase. This means
doing:

Dict.get "Content-Type" response.headers

does not work reliably anymore. It seems to be a trend that will be implemented in the other browsers
because of HTTP/2.

To make sure it works on all browsers, does adding a call to .toLowerCase() in Native/Http.js parseHeaders() function would be a good idea? It would certainly break applications but this is
already the case with the new Chrome 60 anyway.

@process-bot
Copy link

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@BrianHicks
Copy link

Followed the rabbit trail here, more context at whatwg/xhr#146

To summarize:

This is an change to bring headers into alignment with the spec, which does specify that the names are byte-lowercased.

This change took place in:

  • Chrome 60 (stable)
  • Firefox (but rolled back)
  • Safari with High Sierra (unreleased)

Other people/projects have fixed compatibility by lowercasing headers. HTTP/2.0 headers are also lowercase, so this might improve portability across HTTP versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants