Skip to content

Test handling of leading and trailing spaces and tabs#37

Open
DemiMarie wants to merge 1 commit into
nginx:masterfrom
DemiMarie:strip-whitespace-test
Open

Test handling of leading and trailing spaces and tabs#37
DemiMarie wants to merge 1 commit into
nginx:masterfrom
DemiMarie:strip-whitespace-test

Conversation

@DemiMarie
Copy link
Copy Markdown

Proposed changes

The standard requires that they be stripped in HTTP/1.x and rejected in HTTP/2 and HTTP/3. However, leading and trailing whitespace are instead stripped in HTTP/2 and HTTP/3 by default for compatibility reasons. The logic identical for HTTP/2 and HTTP/3, so have the HTTP/2 tests test stripping and the HTTP/3 tests test rejection.

Also add tests that catch leading and trailing tabs not being stripped from HTTP/1.x field values.
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the supported keywords in this PR's description or commit message.

Checklist

Before creating a PR, run through this checklist and mark each as complete:

The standard requires that they be stripped in HTTP/1.x and rejected in
HTTP/2 and HTTP/3.  However, leading and trailing whitespace are instead
stripped in HTTP/2 and HTTP/3 by default for compatibility reasons.  The
logic identical for HTTP/2 and HTTP/3, so have the HTTP/2 tests test
stripping and the HTTP/3 tests test rejection.

Also add tests that catch leading and trailing tabs not being stripped
from HTTP/1.x field values.

Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
@DemiMarie DemiMarie force-pushed the strip-whitespace-test branch from 4708e7a to c72fe5f Compare March 26, 2026 07:02
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.

1 participant