Skip to content

feat: Join headers from http/2 requests on http/1 connections #2529

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

NeoLegends
Copy link

Closes #2528.

Added a test for the function re-joining the headers, and extended the coercion integration test!

// https://tools.ietf.org/html/rfc7540#section-8.1.2.5
if let Some(joined_cookies) = unsplit_cookie_headers(&msg.head.headers) {
msg.head.headers.insert(header::COOKIE, joined_cookies);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually we probably just want to set a boolean value here, and use it later in encode_headers with a new header::COOKIE arm that would prevent writing the header name multiple times, joining them instead, to avoid looking up into the header map and mutating it.

@NeoLegends
Copy link
Author

NeoLegends commented Apr 30, 2021

I'm not super happy about 58a2930 yet, it feels like alot of repetition. Would appreciate a review on whether that's okay (or needs to be improved further).

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.

Hyper does not re-join cookie headers split by http/2
2 participants