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,
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 :-( )
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'.