Author martin.panter
Recipients MeiK, martin.panter, xtreak
Date 2019-01-26.13:03:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1548507794.8.0.248964888356.issue35824@roundup.psfhosted.org>
In-reply-to
Content
I presume MeiK wants to use BaseCookie to parse the Set-Cookie header field, as in

>>> BaseCookie('Hello=World; Expires=Thu, 31 Jan 2019 05:56:00 GMT;')
<BaseCookie: Hello='World'>
>>> BaseCookie('Hello=World; Expires=Thu,31 Jan 2019 05:56:00 GMT;')
<BaseCookie: >

Karthikeyan, if you meant the “sane-cookie-date” format (https://tools.ietf.org/html/rfc6265#page-9), that is just the IETF’s recommended date format. I suspect MeiK is trying to _parse_ the date rather than generate it, in which case the procedure in <https://tools.ietf.org/html/rfc6265#section-5.1.1> may be more relevant. Spaces and commas are both treated as delimiters, so the problematic Expires attribute should parse fine.

BTW, this special handling of Set-Cookie attributes like Expires is not documented, though it does seem intentional. According to the documentation they should be treated as new Morsels.
History
Date User Action Args
2019-01-26 13:03:16martin.pantersetrecipients: + martin.panter, xtreak, MeiK
2019-01-26 13:03:14martin.pantersetmessageid: <1548507794.8.0.248964888356.issue35824@roundup.psfhosted.org>
2019-01-26 13:03:14martin.panterlinkissue35824 messages
2019-01-26 13:03:14martin.pantercreate