New submission from Artur Smęt: The problem is similar to https://bugs.python.org/issue22931 with square brackets in cookie values. Incorrect value is serialized JSON in this case, for example:
>>> from Cookie import SimpleCookie >>> cookie = SimpleCookie() >>> cookie.load('a=b; c={"somekey":"value"}; d=e, f=g, some=other') >>> cookie.output() 'Set-Cookie: a=b' >>> >From my tests I figured out that quote mark (") is causing problems. In fact, according to HTTP specification, cookies can't be JSON objects, but I think that python library shouldn't silently allow incorrect values. Probably incorrect cookies should be skipped, or some exception should be thrown there. ---------- components: Library (Lib) messages: 271901 nosy: Artur Smęt priority: normal severity: normal status: open title: Quote mark breaks cookie processing type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27674> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com