Problem with Cookie module load function

Dustin Boswell boswell at ugcs.caltech.edu
Mon Jun 11 12:08:16 CEST 2001


Yes, I ran into a similar problem.
I just went into the cookie.py file and changed the regular expression to allow
values to contain the equals sign.   I remember vaguely about there being a fix
to some regular expressions problem in cookie.py but can't say for sure if it
was this one.  I'm not even sure if  '='  is allowed to be in a cookie value,
but
I've seen it a lot from web sites, so I think clients should handle it.

Asle Pedersen wrote:

> I am trying to load the following cookie, received from a server:
>
> Set-Cookie: SITESERVER=ID=24752d75a82c30c709a736c1af4b01e5;
> expires=Monday, 01-Jan-2035 00:00:00 GMT; path=/; domain=.editedout.com
>
> The Load function seem to be unable to parse it correctly returning
> SITESERVER='ID' instead of SITESERVER='ID=24752d75a82c30c709a736c1af4b01e5'.
> Has anyone else experienced this problem. One solution is to parse the
> cookie data myself and skip the load function entirely. I guess that
> the cookie is not conformant with any standards, but there
> is little I can do about that.... any suggestions on what to do?
>
> /Asle




More information about the Python-list mailing list