-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Normalize line-folded headers values to not contain newlines #87
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @weierophinney can you have a second look?
As per RFC 7230#3.2.4: > A server that receives an obs-fold in a request message that is not > within a message/http container MUST […] replace > each received obs-fold with one or more SP octets prior to > interpreting the field value or forwarding the message downstream. > […] > A user agent that receives an obs-fold in a response message that is > not within a message/http container MUST replace each received > obs-fold with one or more SP octets prior to interpreting the field > value. Furthermore this change improves interoperability with PSR-7 implementations that reject line folding. The updated behavior matches the suggested behavior with regard to the handling of line-folding in the new php-fig/fig-standards#1274 erratum. Signed-off-by: Tim Düsterhus <duesterhus@woltlab.com>
296cc0e
to
da685b9
Compare
Rebased to add the missing |
IMO OK for |
I'm fine either way. This is a fix for an obscure corner case of the HTTP spec and not something users will encounter in the real world. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
Thanks for the stellar errata for PSR-7, @TimWolla !
My pleasure. Thanks from my side for Diactoros and also for the super nice and speedy handling of my PRs 😃 |
Description
As per RFC 7230#3.2.4:
Furthermore this change improves interoperability with PSR-7 implementations
that reject line folding.
The updated behavior matches the suggested behavior with regard to the handling
of line-folding in the new php-fig/fig-standards#1274 erratum.