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 martin.panter
Recipients MeiK, blueyed, martin.panter, xtreak
Date 2019-04-25.10:09:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556186998.43.0.297946491243.issue35824@roundup.psfhosted.org>
In-reply-to
Content
Test_http_cookies line 19 has the following test case:

{'data': 'keebler="E=mc2; L=\\"Loves\\"; fudge=\\012;"',
 'dict': {'keebler' : 'E=mc2; L="Loves"; fudge=\012;'},
 'repr': '''<SimpleCookie: keebler='E=mc2; L="Loves"; fudge=\\n;'>''',
 'output': 'Set-Cookie: keebler="E=mc2; L=\\"Loves\\"; fudge=\\012;"'}

This is similar to an example in the documentation:

>>> C.load('keebler="E=everybody; L=\\"Loves\\"; fudge=\\012;";')
>>> print(C)
Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=\012;"

If you break parsing of this string in the “load” method, you break documented behaviour. The “http.cookie” module is documented to follow RFC 2109. I believe the strings are valid by RFC 2109, in which the value is allowed to use the HTTP “quoted-string” format.
History
Date User Action Args
2019-04-25 10:09:58martin.pantersetrecipients: + martin.panter, blueyed, xtreak, MeiK
2019-04-25 10:09:58martin.pantersetmessageid: <1556186998.43.0.297946491243.issue35824@roundup.psfhosted.org>
2019-04-25 10:09:58martin.panterlinkissue35824 messages
2019-04-25 10:09:58martin.pantercreate