Bugs item #1210326, was opened at 2005-05-28 11:13 Message generated for change (Comment added) made by jjlee You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1210326&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: tvogt (tovo) Assigned to: Nobody/Anonymous (nobody) Summary: comma separated cookie values Initial Comment: According to RFC 2109 "For backward compatibility, the separator in the Cookie header is semi-colon (;) everywhere. A server should also accept comma (,) as the separator between cookie-values for future compatibility." The Cookie standard module does not support this as it should. >>> import Cookie >>> c=Cookie.SimpleCookie() >>> c.load('foo=2, bar=3') >>> print c['foo'].value 2, ---------------------------------------------------------------------- Comment By: John J Lee (jjlee) Date: 2005-06-29 20:53 Message: Logged In: YES user_id=261020 Forgot to add or demo in that CGI script: even Set-Cookie: abc=def, ghi=jkl is just one Netscape cookie, name 'abc', value 'def, ghi=jkl'. ---------------------------------------------------------------------- Comment By: John J Lee (jjlee) Date: 2005-06-29 20:34 Message: Logged In: YES user_id=261020 Unfortunately one can't take the cookie specs at face value. Netscape cookies behaviour (the de-facto standard, ie. IE & Firefox behaviour -- cookie_spec.html is barely worth the web page it's written on, being flat-out wrong in several major ways, and very under-specified) has, I'm told, always simply been simply "split on semicolons". Certainly that's what IE and Mozilla do now: (this is just the text of a CGI for viewing: I didn't make it executable on reportlab.org) http://www.reportlab.org/~jjlee/cookie_demo.py IIRC RFC 2965 is only implemented by Opera, and is certainly now quite dead as an internet standard. (though I think it is useful as a guide for writing cookie-handling code, you can't follow blindly - not even close :-( ) ---------------------------------------------------------------------- Comment By: A.M. Kuchling (akuchling) Date: 2005-06-02 00:19 Message: Logged In: YES user_id=11375 The updated cookie RFC, RFC 2965, also has this language. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1210326&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com