Bug in WebOb 0.9.8 - one liner fix

0 views
Skip to first unread message

Alexandre Bourget

unread,
Jul 27, 2010, 11:32:47 PM7/27/10
to pylons-...@googlegroups.com
Hello, I've discovered a bug in WebOb 0.9.8 (which seems the latest released).

When creating the "expire" date for the set_cookie function in response.py, the function that is called is "_serialize_cookie_date".  Unfortunately, this function is buggy, as it renders using strftime, which goes through the locale (and in French, it adds an accent in the month of August! for Août).  So my application just broke trying to set a cookie to next week.

In fact, the function _serialize_date (which is beside _serialize_cookie_date) in datetime_utils.py does exactly what's required, calling "formatdate" from the "rfc822" module.  I tried to keep using the ...cookie_date function, but hit another bug and another, until the fixes made the two function identical.

My suggestion is to just use _serialize_date() in response.py instead of _serialize_cookie_date() and ditch the ..cookie_date() function altogether.

This is really a blocker for me, thanks for attention to this bug.


Alexandre Bourget

Wyatt Baldwin

unread,
Jul 28, 2010, 12:42:14 AM7/28/10
to pylons-discuss
On Jul 27, 8:32 pm, Alexandre Bourget <bourget.alexan...@gmail.com>
wrote:
You might want to cross post this to the Paste list:

http://groups.google.com/group/paste-users

and/or submit a ticket here:

http://trac.pythonpaste.org/pythonpaste/report
Reply all
Reply to author
Forward
0 new messages