Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Multiple cookies are not received by default/httplib and requests client #192

Open
wosc opened this issue May 4, 2018 · 2 comments
Open

Comments

@wosc
Copy link
Contributor

wosc commented May 4, 2018

If the server sends multiple Set-Cookie headers, both the default and the requests client conflate those into one header-line, comma-separating the values -- which cookiejar cannot parse. Luckily, the urllib3 client keeps the headers as-is, so that it works in this case.

@gawel
Copy link
Member

gawel commented May 9, 2018

I guess you're referring to WSGIProxy2 ? That's weird since requests use urllib3

@wosc
Copy link
Contributor Author

wosc commented May 10, 2018

Hrm, it's a mix-up between wsgiproxy and webtest, I think. For which actually requests is the perfect example, as they behave really sneaky regarding cookies: for their own cookie-handling they send off the urllib3 Response object (which has individual set-cookie headers) to the cookiejar, before wrapping it in their own requests Response object (which then conflates them) -- which doesn't work for webtest, since that operates on the completed Response object of the client: https://github.com/Pylons/webtest/blob/master/webtest/app.py#L659

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants