[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tue, 31 Aug 2010 13:07:05 -0700
Please forgive me if this list is not the correct recipient for this
message. If there is a better destination, I will be happy to send it
I am working on a web services client that is mostly a wrapper around
URL Package. I am using GNU Emacs v.23.2. My client implementation
requires keeping tight rein on a session ID cookie. My sessions are
terminating abnormally. I believe I have tracked this issue to a bug
If the cookie's expiration date is the same as today's date,
url-cookie-expired-p normalizes the times to seconds and compares the
difference. I believe the problem is in the normalization algorithm.
In pseudo-code, the current implementation does:
(+ (* 360 seconds) (* 60 minutes) (* 1 hours))
I believe this should be:
(+ (* 1 seconds) (* 60 minutes) (* 360 hours)).
As is, the result of the comparison is almost always dependent on the
number of seconds in the time strings. It is interesting how
frequently this mistaken comparison is correct.
I have attached a patch.
Description: Binary data
- bug#6957: url-cookie-expired-p,
shawn boles <=