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

Line folding in HTTP headers is deprecated as of RFC7230 #291

Merged
merged 2 commits into from
Jun 8, 2016

Conversation

BigBlueHat
Copy link
Member

...who knew, right?!

This switches the Link headers to be one per line--which reads pretty well still.

@azaroth42 cool? 😄

@azaroth42
Copy link
Collaborator

Do we know the effects on other clients that might overwrite the previous header instance, rather than add to it? We could instead make it clear that the line break in the example is just for display purposes, and all of the headers MUST be on a single line without CRLF ?

@BigBlueHat
Copy link
Member Author

AFAIK, node, PHP, and Python (at least) all support proper multiple header values--Set-Cookie is often used this way, fwiw, and apparently Cache-Control too from time to time.

I'm not keen on the examples not being valid requests. I'd prefer we do the multiple Link headers as one per line (as in this PR) and then (if you think we need) add a note about it also being possible to do a single Link header line with the various values concatenated with ,...but that runs into header value limits and really isn't what folks will do anyhow.

We could invite others into this question (if you want), but I think that one per-line will do the trick and it's also more legible...which is a nice add. 😄

@tilgovi
Copy link
Contributor

tilgovi commented Jun 8, 2016

👍 all serious HTTP parsers should support multiple values for header keys. We should definitely not use something deprecated in the hopes that it better accommodates bad software.

@azaroth42
Copy link
Collaborator

Cool, just wanted to ask in case there was some system that treated them like a dictionary and hence would end up losing data.

@azaroth42 azaroth42 merged commit 160cde3 into gh-pages Jun 8, 2016
@azaroth42 azaroth42 deleted the protocol-tweaky-bugs branch September 30, 2016 16:22
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

Successfully merging this pull request may close these issues.

3 participants