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

[http_client_conformance_tests] Add flag to skip tests for folded headers #1219

Closed
Anikate-De opened this issue May 31, 2024 · 1 comment · Fixed by #1222
Closed

[http_client_conformance_tests] Add flag to skip tests for folded headers #1219

Anikate-De opened this issue May 31, 2024 · 1 comment · Fixed by #1222
Assignees

Comments

@Anikate-De
Copy link
Contributor

Anikate-De commented May 31, 2024

According to the current internet standard (RFC 9110: HTTP Semantics), "\r\n" is invalid

Field values containing CR, LF, or NUL characters are invalid and dangerous, due to the varying ways that implementations might parse and interpret those characters; a recipient of CR, LF, or NUL within a field value MUST either reject the message or replace each of those characters with SP before further processing or forwarding of that message.

OkHttp (please see this) and many modern web frameworks (like Flask) reject Header values which contain such illegal characters.

However, the server headers folded headers test group adds rigidity by forcing clients to replace invalid characters with space.

I (thanks to @brianquinlan) suggest adding a boolean flag supportsFoldedHeaders to testResponseHeaders() which ultimately lets us skip the test: folded headers

Clients rejecting headers with illegal values can also be considered to be conformant to the HTTP Standard.

@Anikate-De
Copy link
Contributor Author

I'm willing to take up this issue as it will be beneficial for making the upcoming package ok_http more conformant.

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 a pull request may close this issue.

1 participant