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

Allow empty header values #1965

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

jimmy-park
Copy link
Contributor

The current implementation rejects the request and responds with 400 Bad Request if the header value is empty.
However, RFC 7230 states that empty header values are allowed.

header-field   = field-name ":" OWS field-value OWS

field-name     = token
field-value    = *( field-content / obs-fold )
field-content  = field-vchar [ 1*( SP / HTAB ) field-vchar ]
field-vchar    = VCHAR / obs-text

obs-fold       = CRLF 1*( SP / HTAB )
               ; obsolete line folding
               ; see [Section 3.2.4](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4)

@yhirose
Copy link
Owner

yhirose commented Oct 18, 2024

@jimmy-park thanks for the pull request!

@yhirose yhirose merged commit d869054 into yhirose:master Oct 18, 2024
4 checks passed
@jimmy-park jimmy-park deleted the allow-empty-header-value branch October 18, 2024 14:18
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