Christoph Zwerschke wrote:
>  > With WebOB, set_cookie(x,x, max_age = 3600, ...) will add a field to
>  > headers like this:
>  >
>  > *'set-cookie': 'ck_cookie=xxx; Domain=.xxx.com; expires="Wed, 16 Apr
>  > 2008 00:26:12 GMT";Max-Age=3600
>  > *
>  > but seems the 'expires' date incorrect, may be it
>  > should be "%a, %d-%b-%Y %H:%M:%S GMT"?
> 
> Yes, that's the correct format, I think Alec is right here.

Yeah, after looking around a bit I found Perl's CGI::Util, which uses 
that format.  Javascript guides, however, suggest using 
date.toGMTString(), which produces dates without dashes.  And another 
document suggests that any RFC 2616 date will due -- which probably is 
what browsers do, but not what some other code does.  Anyway, I'm fine 
changing this to be more conservative.

The other thing I wasn't sure about is quoting.  The cookie module 
doesn't quote it by default, but it also fails to parse the cookies 
properly without quoting (due to the comma).  The cookie header is, of 
course, totally stupid -- primarily, I think, because of the way it 
groups cookies and uses commas.

Anyway, the change is in trunk.

-- 
Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org

_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to