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

Don't count CR or LF as whitespace when trimming whitespace from header values #306

Merged
merged 1 commit into from
Sep 29, 2021

Conversation

glbrntt
Copy link
Contributor

@glbrntt glbrntt commented Sep 29, 2021

Motivation:

The OWS rule from the HTTP semantics draft only considers 'SP' and
'HTAB' to be whitespace. We also (unnecessarily) consider CR and LF to
be whitespace.

Modifications:

  • Remove CR and LF from the characters we consider to be whitespace
  • Update tests

Result:

We no longer consider CR or LF to be whitespace when trimming
whitespace when producing the canonical form of header values.

…er values

Motivation:

The OWS rule from the HTTP semantics draft only considers 'SP' and
'HTAB' to be whitespace. We also (unnecessarily) consider CR and LF to
be whitespace.

Modifications:

- Remove CR and LF from the characters we consider to be whitespace
- Update tests

Result:

We no longer consider CR or LF to be whitespace when trimming
whitespace when producing the canonical form of header values.
@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Sep 29, 2021
@glbrntt glbrntt requested a review from Lukasa September 29, 2021 09:29
@glbrntt glbrntt merged commit d34f4b0 into apple:main Sep 29, 2021
@glbrntt glbrntt deleted the gb-dont-trim-cr-or-lf branch September 29, 2021 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants