GNU bug report logs - #8747
23.3.50; [PATCH] Fix a bug in url-cookie

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Fri, 27 May 2011 19:47:02 UTC

Severity: normal

Tags: patch

Found in version 23.3.50

Done: Leo <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8747 in the body.
You can then email your comments to 8747 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org:
bug#8747; Package emacs. (Fri, 27 May 2011 19:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org. (Fri, 27 May 2011 19:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.3.50; [PATCH] Fix a bug in url-cookie
Date: Sat, 28 May 2011 03:46:46 +0800
I intend to install the following patch to fix a bug introduced in
revno: 78016 (2007-06-12).

In r78016, :named was not supplied to defstruct which resulted in no
url-cookie-p defined, which in turn lead to no cookies saved to
url-cookie-file. So there is little compatibility to maintain now that 4
years has passed ;)

Leo


diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index 7fdd8b17..78afa163 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -35,17 +35,13 @@ (defgroup url-cookie nil
   :group 'url)
 
 ;; A cookie is stored internally as a vector of 7 slots
-;; [ cookie NAME VALUE EXPIRES LOCALPART DOMAIN SECURE ]
+;; [ url-cookie NAME VALUE EXPIRES LOCALPART DOMAIN SECURE ]
 
 (defstruct (url-cookie
             (:constructor url-cookie-create)
             (:copier nil)
-            ;; For compatibility with a previous version which did not use
-            ;; defstruct, and also in order to make sure that the printed
-            ;; representation does not depend on CL internals, we use an
-            ;; explicitly managed tag.
-            (:type vector))
-  (tag 'cookie :read-only t)
+            (:type vector)
+            :named)
   name value expires localpart domain secure)
 
 (defvar url-cookie-storage nil         "Where cookies are stored.")
@@ -77,8 +73,6 @@ (defun url-cookie-parse-file (&optional fname)
   ;; It's completely normal for the cookies file not to exist yet.
   (load (or fname url-cookie-file) t t))
 
-(declare-function url-cookie-p "url-cookie" t t) ; defstruct
-
 (defun url-cookie-clean-up (&optional secure)
   (let ((var (if secure 'url-cookie-secure-storage 'url-cookie-storage))
 	new new-cookies)




Reply sent to Leo <sdl.web <at> gmail.com>:
You have taken responsibility. (Sun, 29 May 2011 02:48:02 GMT) Full text and rfc822 format available.

Notification sent to Leo <sdl.web <at> gmail.com>:
bug acknowledged by developer. (Sun, 29 May 2011 02:48:02 GMT) Full text and rfc822 format available.

Message #10 received at 8747-done <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: 8747-done <at> debbugs.gnu.org
Subject: Re: bug#8747: 23.3.50; [PATCH] Fix a bug in url-cookie
Date: Sun, 29 May 2011 10:46:51 +0800
version 24.1.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 26 Jun 2011 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 363 days ago.

Previous Next


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