-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Cookies for different domains with same name disappear #1125
Comments
We are experiencing the same problem. |
Some WIP JeckLabs@2259d07 |
Your WIP hack Another question scaring me is: what to do with |
Hmm, I think I have not used any private API, only public methods, and mock objects. That is the way requests do (see - http://docs.python-requests.org/en/master/_modules/requests/cookies/ ). I agree that's ugly, but allows use standard library code without copy/paste. I think ClientSession.cookies return a list of Cookie in master. I fix that in JeckLabs@668cbee#diff-7dd84b5ef8d5eea2de1dfc5329411dfcL497 but maybe I missing something. And now I have problems with tests: In https://github.com/KeepSafe/aiohttp/blob/master/tests/test_client_functional.py#L1410 setting 3 cookies but expecting only 2. In https://github.com/KeepSafe/aiohttp/blob/master/tests/test_client_functional.py#L1395 security flag is set but expecting receive cookie through insecure HTTP protocol. |
I know how requests is implemented and considering it very dirty hack. ClientSession.cookies is SimpleCookie actually with dict-like interface. |
So I can copy lib from https://hg.python.org/cpython/file/tip/Lib/test/test_http_cookiejar.py rewrite some method, and then copy tests from https://hg.python.org/cpython/file/tip/Lib/test/test_http_cookiejar.py , it's ok? Looks a bit tricky... |
No, it's not OK. |
And, please, before starting to hack please tell me what do you want to do with |
I can implement wrapper with SimpleCookie-like interface, it's relatively easy. |
SimpleCookie is dict-like object where keys are cookie names. |
Yes, |
Yesterday I've tried to port aiohttp.CookieJar is much cleaner. I'm going to fix it's bugs. |
Fixed by #1173 |
It seems that cookies are stored in key / value dictionary that causing the problem in the storing cookies from different domains / subdomains in one session.
The text was updated successfully, but these errors were encountered: