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

Merged cookies break python #2196

Closed
mrkurt opened this issue Apr 28, 2020 · 4 comments
Closed

Merged cookies break python #2196

mrkurt opened this issue Apr 28, 2020 · 4 comments

Comments

@mrkurt
Copy link

mrkurt commented Apr 28, 2020

We're using Hyper to proxy http2 -> http1.1, and the way it combines cookies breaks for Python apps. The built in Python cookie parser splits multiple cookie values on , (note the space), while Hyper combines them with just a , and no space. Hyper isn't wrong to do this, but the Python devs are being obstinate and it seems like an easy-ish workaround to just add the space in Hyper.

Stupid Python bug: https://bugs.python.org/issue23930

@seanmonstar
Copy link
Member

What do you mean by merging cookies? How are you doing that?

@mrkurt
Copy link
Author

mrkurt commented Apr 29, 2020

We're not intentionally merging cookies. We're just taking a request from an HTTP server and handing it off as a request to the HTTP client, we do add some headers but don't touch cookies.

@seanmonstar
Copy link
Member

Hm, could you share a little more what code you are using? Because in hyper itself, headers aren't merged either when parsing or when serializing.

@seanmonstar
Copy link
Member

I don't think this is happening inside hyper. I've search through the HTTP/1 and HTTP/2 parts internally, and I don't see any values being concatenated together. If you have more details, we can re-open.

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

No branches or pull requests

2 participants