Ticket #439 (closed defect: fixed)

Opened 18 months ago

Last modified 18 months ago

Critical error with WebOb, when in French (unicode error with rendered date)

Reported by: abourget Owned by: maluke
Priority: normal Milestone: 1.4.1
Component: webob Version: released-version
Severity: normal Keywords:
Cc: maluke@…

Description

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.

Follow up also the thread on GGroups:  http://groups.google.com/group/pylons-discuss/browse_thread/thread/46fcb63c8b18fd0d

Change History

Changed 18 months ago by maluke

provide a test case please (and info on what has to be changed on an OS level to reproduce it)

Changed 18 months ago by maluke

  • cc maluke@… added

Changed 18 months ago by maluke

  • priority changed from high to normal
  • severity changed from critical to normal

Changed 18 months ago by maluke

  • status changed from new to closed
  • resolution set to invalid

no test case

Changed 18 months ago by maluke

  • status changed from closed to reopened
  • resolution invalid deleted

Changed 18 months ago by maluke

  • status changed from reopened to closed
  • resolution set to fixed

Changed 18 months ago by maluke

  • status changed from closed to reopened
  • resolution fixed deleted

Changed 18 months ago by maluke

  • owner changed from ianb to maluke
  • status changed from reopened to new

Changed 18 months ago by maluke

  • status changed from new to assigned

Changed 18 months ago by maluke

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.