'/' not allowed in cookie name?

Oliver Rutherfurd orutherfurd at wwre.org
Thu Feb 14 12:17:50 EST 2002


Hi,

I'm using Steve Purcell's excellent 'WebUnit' module, but receiving a cookie.CookieError when a server I am connecting to sends me a cookie with '/' in the name.

Something like:

Set-Cookie: 1/2="one half"

After spending a little time reading http://www.faqs.org/rfcs/rfc2109.html I am still not any closer to understanding whether '/' is a legal value that the cookie module should accept in a name, or whether the server is misbehaving.

Adding a '/' to _LegalChars on line 252 of Cookie.py (using Python 2.2) seems to make my problem go away, but I don't know whether this is the correct things to do.

Is this a bug in Cookie.py or with the server I am connecting to?

Regards,
-Ollie Rutherfurd
<oliver at rutherfurd dot net>




More information about the Python-list mailing list