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

fix(http1): trim obs-folded headers when unfolding #2926

Merged
merged 1 commit into from
Jul 27, 2022

Conversation

seanmonstar
Copy link
Member

This used to simply replace any \r and \n with a space. While that much is valid, it wouldn't replace leading HTABs, which are also used to start a folded line. The specification also says 1-or-more, and curl chooses to make that exactly 1. By trimming while unfolding, we get the same output.

@nox did you want to check that while this does change the number of whitespaces that might be in a header field, this hopefully shouldn't break your use cases?

@seanmonstar seanmonstar requested a review from nox July 26, 2022 23:13
@seanmonstar seanmonstar merged commit d4b5bd4 into master Jul 27, 2022
@seanmonstar seanmonstar deleted the obs-fold-replace-harder branch July 27, 2022 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants