[mod_python] Cookie problem

dagurp at heimsnet.is dagurp at heimsnet.is
Tue Feb 15 06:54:43 EST 2005


dagurp at heimsnet.is wrote:

>Gregory (Grisha) Trubetskoy wrote:
>
>>Dagur -
>>
>>I have just tried this with Firefox:
>>
>>    cookie = Cookie.Cookie('eggs', 'spam')
>>    cookie.expires = time.time() + 1209600
>>    Cookie.add_cookie(req, cookie)
>>
>>and it set the expires correctly to Feb 23.
>>
>>When I do a req.log_error(str(cookie)), I get this in the log:
>>
>>eggs=spam; expires=Wed, 23-Feb-2005 15:11:47 GMT
>>
>>What version of mod_python are you using?
>>
>>Grisha 
>
>
>I figured it out!
>
>I tried the req.log_error(str(cookie)) thing again, and this time in the right
>location (oops). Then the problem became obvious.
>
>Since I had set the locale to Icelandic, the date in the cookie had Icelandic
>in it and that's why it didn't work. After I set the locale back to english
>there were no problems. 
>
>Thanks a lot for your help!
>
>Dagur
>
>

Btw. Should this be considered a bug in the cookie module? If not, maybe there
should be some kind of warning in the documentation?



More information about the Mod_python mailing list