-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Cookies for different domains with same name disappear #1125
Copy link
Copy link
Closed
Description
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.
with aiohttp.ClientSession() as client:
async with client.get('https://httpbin.org/cookies/set?test=ok') as resp:
logging.info(await resp.json())
async with client.get('https://httpbin.org/cookies') as resp:
logging.info(await resp.json())
async with client.get('https://http2bin.org/cookies/set?test=fail') as resp:
logging.info(await resp.json())
async with client.get('https://httpbin.org/cookies') as resp:
logging.info(await resp.json())
logger.info(client.cookies)2016-08-25 21:57:38 INFO {'cookies': {'test_cookie': 'ok'}}
2016-08-25 21:57:39 INFO {'cookies': {'test_cookie': 'ok'}}
2016-08-25 21:57:39 INFO {'cookies': {'test_cookie': 'fail'}}
2016-08-25 21:57:39 INFO {'cookies': {}}
Reactions are currently unavailable