Skip to content

Add a specific test for optional whitespace in HTTP headers#13486

Merged
normanmaurer merged 4 commits intonetty:4.1from
chrisvest:41-http-ows
Jul 17, 2023
Merged

Add a specific test for optional whitespace in HTTP headers#13486
normanmaurer merged 4 commits intonetty:4.1from
chrisvest:41-http-ows

Conversation

@chrisvest
Copy link
Copy Markdown
Member

Motivation:
Since we made header value validation more strict in 4.1.84, we've gotten the occasional issue reported that whitespace isn't handled correctly.

Modification:
Add a test that stresses the optional whitespace decoding of HTTP headers, because I think we didn't have one already.
Also include a javadoc comment with relevant RFC references.

Result:
This proves that we handle optional whitespace correctly when we decode HTTP headers.

This proves that we handle optional whitespace correctly when we decode HTTP headers.
Copy link
Copy Markdown
Member

@normanmaurer normanmaurer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one nit.

chrisvest and others added 2 commits July 13, 2023 13:44
Co-authored-by: Norman Maurer <norman_maurer@apple.com>
Comment thread codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java Outdated
Co-authored-by: Norman Maurer <norman_maurer@apple.com>
@normanmaurer normanmaurer merged commit 85ddc97 into netty:4.1 Jul 17, 2023
@normanmaurer
Copy link
Copy Markdown
Member

@chrisvest can you port to main as well ?

@normanmaurer normanmaurer added this to the 4.1.95.Final milestone Jul 17, 2023
chrisvest added a commit that referenced this pull request Jul 17, 2023
Motivation:
Since we made header value validation more strict in 4.1.84, we've
gotten the occasional issue reported that whitespace isn't handled
correctly.

Modification:
Add a test that stresses the optional whitespace decoding of HTTP
headers, because I think we didn't have one already.
Also include a javadoc comment with relevant RFC references.

Result:
This proves that we handle optional whitespace correctly when we decode
HTTP headers.

---------

Co-authored-by: Norman Maurer <norman_maurer@apple.com>
@chrisvest chrisvest deleted the 41-http-ows branch July 17, 2023 14:58
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.

2 participants