Opened 8 years ago
Closed 8 years ago
#13543 closed bug (fixed)
Cookies with expiration date on Sunday are stored incorrectly
Reported by: | markh | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Kits/Network Kit | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
When a cookie has an expiration date of Sunday, the cookie is stored to disk incorrectly. Instead of storing "Sun" as the day, it stores "?". I tracked this to commit hrev50924 which sets the day of the week when converting the BHttpTime as a string. The DayOfWeek function returns 7 for Sunday while the strftime expects 0 for Sunday. I have an example that shows the problem and a patch that fixes the problem in BHttpTime.
Attachments (2)
Change History (7)
by , 8 years ago
Attachment: | BHttpTime.cpp added |
---|
comment:1 by , 8 years ago
patch: | 0 → 1 |
---|
by , 8 years ago
Attachment: | 0001-Fix-13543-Make-sure-Sunday-is-returned-properly.patch added |
---|
comment:4 by , 8 years ago
The modulo is a simple fix and easy to understand, but feel free to change it to a conditional operator if that fits the style of the project better.
comment:5 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Applied in hrev51194. Unit tests would be welcome.
Example showing the problem