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

refactor: store header keys lower case internally #10958

Merged
merged 2 commits into from
Jun 15, 2021

Conversation

lucacasonato
Copy link
Member

This is a minor optimization that removes some header key lowercasing
that previously happened on access, instead moving it to write.

This is a minor optimization that removes some header key lowercasing
that previously happened on access.
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM

@lucacasonato lucacasonato merged commit 49ec3d1 into denoland:main Jun 15, 2021
@lucacasonato lucacasonato deleted the store_headers_lowercase branch June 15, 2021 14:37
@lucacasonato
Copy link
Member Author

This might have actually had the unfortunate side effect that headers are always lowercased on the wire. For HTTP2 this is the case anyway, but it apparently breaks some HTTP/1 servers that don't understand that headers are case insensitive 🤦‍♂️.

We could fix this while still maintaining the speedup introduced in this PR by introducing a lowercase name -> case used in header list hashmap inside of the Headers object.

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.

None yet

2 participants