GNU bug report logs - #6957
url-cookie-expired-p

Previous Next

Package: emacs;

Reported by: shawn boles <shawn.boles <at> gmail.com>

Date: Tue, 31 Aug 2010 20:08:02 UTC

Severity: normal

Fixed in version 23.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: shawn boles <shawn.boles <at> gmail.com>
Subject: bug#6957: closed (Re: bug#6957: url-cookie-expired-p Redux (at last))
Date: Thu, 09 Sep 2010 05:38:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#6957: url-cookie-expired-p

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 6957 <at> debbugs.gnu.org.

-- 
6957: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6957
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 6957-done <at> debbugs.gnu.org
Subject: Re: bug#6957: url-cookie-expired-p Redux (at last)
Date: Thu, 09 Sep 2010 01:39:07 -0400
Version: 23.3

Thank you for the patch; applied.

BTW, something like

(if (not foo) nil bar)

can be written as (and foo bar).

[Message part 3 (message/rfc822, inline)]
From: shawn boles <shawn.boles <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: url-cookie-expired-p
Date: Tue, 31 Aug 2010 13:07:05 -0700
[Message part 4 (text/plain, inline)]
Hello,

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
on.

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
in url-cookie-expired-p.

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.

Thank you,

-shawn
[url-cookie.el.patch (application/octet-stream, attachment)]

This bug report was last modified 14 years and 342 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.