This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Юрий Пухальский
Recipients Юрий Пухальский
Date 2018-02-03.10:03:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1517652228.92.0.467229070634.issue32755@psf.upfronthosting.co.za>
In-reply-to
Content
I'm using python 3.5.4.
The site gives me two headers:
<CIMultiDictProxy(... 'Set-Cookie': 'LOGIN_SESSION=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=.etoday.co.kr', 'Set-Cookie': 'LOGIN_SESSION=18676-0.53621000; path=/; domain=.etoday.co.kr' ... )>
I'm using aiohttp that iterates the headers and if it's set-cookie, calls SimpleCookie.load(). The latter maintains a dict inside by the cookie name.

So that's what happens, first we add a dict entry with LOGIN_SESSION=deleted and phony expiration date. Next cookie, the valid one, gets into the same dict entry, updates the value to the right one, but expiration date remains in the past. The result is that this cookie is not used.

I don't know the good way of handling it. Maybe clear the cookie fields before updating the dict? Or this behaviour is intended? I think the situation itself is wrong, the site shouldn't be sending this, but how to cope with it?
History
Date User Action Args
2018-02-03 10:03:48Юрий Пухальскийsetrecipients: + Юрий Пухальский
2018-02-03 10:03:48Юрий Пухальскийsetmessageid: <1517652228.92.0.467229070634.issue32755@psf.upfronthosting.co.za>
2018-02-03 10:03:48Юрий Пухальскийlinkissue32755 messages
2018-02-03 10:03:48Юрий Пухальскийcreate