From unknown Sun Jun 22 08:06:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8747: 23.3.50; [PATCH] Fix a bug in url-cookie Resent-From: Leo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: monnier@iro.umontreal.ca, bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 May 2011 19:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 8747@debbugs.gnu.org Cc: Stefan Monnier X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Stefan Monnier Received: via spool by submit@debbugs.gnu.org id=B.130652562232755 (code B ref -1); Fri, 27 May 2011 19:47:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 May 2011 19:47:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QQ2zt-0008WE-5S for submit@debbugs.gnu.org; Fri, 27 May 2011 15:47:01 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QQ2zr-0008W3-MK for submit@debbugs.gnu.org; Fri, 27 May 2011 15:47:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQ2zl-0004pW-O2 for submit@debbugs.gnu.org; Fri, 27 May 2011 15:46:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RFC_ABUSE_POST, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:57611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQ2zl-0004pS-MU for submit@debbugs.gnu.org; Fri, 27 May 2011 15:46:53 -0400 Received: from eggs.gnu.org ([140.186.70.92]:43860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQ2zk-00006z-Rh for bug-gnu-emacs@gnu.org; Fri, 27 May 2011 15:46:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQ2zk-0004p9-1x for bug-gnu-emacs@gnu.org; Fri, 27 May 2011 15:46:52 -0400 Received: from mail-pz0-f41.google.com ([209.85.210.41]:36012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQ2zj-0004p4-QT for bug-gnu-emacs@gnu.org; Fri, 27 May 2011 15:46:51 -0400 Received: by pzk4 with SMTP id 4so1117803pzk.0 for ; Fri, 27 May 2011 12:46:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:x-debbugs-cc:date:message-id :mime-version:content-type; bh=jVYLe3u5MH74XXpJqSvTGe2Fcyb4ViyBAQ53qq4Qj2o=; b=uZUsEXkxYDXw5uCwOlyy0k5n67mSM1wXX3I1C2JZgnOlSYmJgKj/c6+wSur2JpA1vQ 7xTgAllrwKxYMjhsDHEbsKCIAvEyXxt9nVF/8npb5aCOHo4rgR72MaXGOkMUUI/J5pc6 P4KPSbnUp945wj6Q+6vzWY0jLKIXHJ/Za37IU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:x-debbugs-cc:date:message-id:mime-version :content-type; b=g0G/RVluUVzWPP8eNbSAGFoC27ZuVGGHX+weEE45yYLwhSHPArjYnhCQeXWNgW8bQL 808lDZY5fEhSUTeX76Wvgba8EdWoTAXYQDcnq7uZDJdVxTNFssQ/d09hkxLpWv0hX09Q kXjz0LgvQa6IyqlsEl19t1LO+nCsqZ/gSd9Do= Received: by 10.68.54.170 with SMTP id k10mr1009495pbp.522.1306525610936; Fri, 27 May 2011 12:46:50 -0700 (PDT) Received: from th041091.ip.tsinghua.edu.cn (th041109.ip.tsinghua.edu.cn [59.66.41.109]) by mx.google.com with ESMTPS id g1sm144964pbj.3.2011.05.27.12.46.49 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 May 2011 12:46:50 -0700 (PDT) From: Leo Date: Sat, 28 May 2011 03:46:46 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.2 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.2 (-----) 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) From unknown Sun Jun 22 08:06:59 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Leo Subject: bug#8747: closed (Re: bug#8747: 23.3.50; [PATCH] Fix a bug in url-cookie) Message-ID: References: X-Gnu-PR-Message: they-closed 8747 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 8747@debbugs.gnu.org Date: Sun, 29 May 2011 02:48:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1306637282-2607-1" This is a multi-part message in MIME format... ------------=_1306637282-2607-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #8747: 23.3.50; [PATCH] Fix a bug in url-cookie 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 8747@debbugs.gnu.org. --=20 8747: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D8747 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1306637282-2607-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 8747-done) by debbugs.gnu.org; 29 May 2011 02:47:09 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QQW20-0000ez-Nb for submit@debbugs.gnu.org; Sat, 28 May 2011 22:47:09 -0400 Received: from mail-px0-f170.google.com ([209.85.212.170]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QQW1y-0000eV-3K for 8747-done@debbugs.gnu.org; Sat, 28 May 2011 22:47:06 -0400 Received: by pxi19 with SMTP id 19so1764230pxi.29 for <8747-done@debbugs.gnu.org>; Sat, 28 May 2011 19:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=J4zDAFqDAhGUz6vCUfV1W+KMVh4BG5QdRnziz0vJLzo=; b=xH3B4yZItP/+Mpeygdb7VYiPaFNSIgjvQ1Y7VH9h1hko7SqkQHhRpAcVZgsz6ZmcB8 8jImFADfr4lCAilEAwUFF9gNGcYCynUXuw7ttRA4mFa2FpgimI7q9fnxD5O0LJPQJrfp Nm8kxwWBAjft2duzYsQpXRldIHaDf+0/6lOtM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; b=jt52FLvnltIQJa+6jhmsz9uD9htZfiB+yMM2hkeJwfcbiOCwNXdU2JUABodX152AZA MAYJVkHdjYZpKg9/7mw8sUddiDFuRWC+/0JtBYfis2u3eWYUaByXTjCCz4Elhfv8ck+j kh58xhH1TZ2it+f6Emq+BwZPDfgnnAf7Nd6s0= Received: by 10.142.215.19 with SMTP id n19mr497780wfg.265.1306637220062; Sat, 28 May 2011 19:47:00 -0700 (PDT) Received: from th041091.ip.tsinghua.edu.cn (th041091.ip.tsinghua.edu.cn [59.66.41.91]) by mx.google.com with ESMTPS id x8sm2284885wfx.19.2011.05.28.19.46.57 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 28 May 2011 19:46:59 -0700 (PDT) From: Leo To: 8747-done@debbugs.gnu.org Subject: Re: bug#8747: 23.3.50; [PATCH] Fix a bug in url-cookie References: Date: Sun, 29 May 2011 10:46:51 +0800 In-Reply-To: (Leo's message of "Sat, 28 May 2011 03:46:46 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3.50 (Mac OS X 10.6.7) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 8747-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.0 (----) version 24.1. ------------=_1306637282-2607-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 27 May 2011 19:47:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QQ2zt-0008WE-5S for submit@debbugs.gnu.org; Fri, 27 May 2011 15:47:01 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QQ2zr-0008W3-MK for submit@debbugs.gnu.org; Fri, 27 May 2011 15:47:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQ2zl-0004pW-O2 for submit@debbugs.gnu.org; Fri, 27 May 2011 15:46:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RFC_ABUSE_POST, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:57611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQ2zl-0004pS-MU for submit@debbugs.gnu.org; Fri, 27 May 2011 15:46:53 -0400 Received: from eggs.gnu.org ([140.186.70.92]:43860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQ2zk-00006z-Rh for bug-gnu-emacs@gnu.org; Fri, 27 May 2011 15:46:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQ2zk-0004p9-1x for bug-gnu-emacs@gnu.org; Fri, 27 May 2011 15:46:52 -0400 Received: from mail-pz0-f41.google.com ([209.85.210.41]:36012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQ2zj-0004p4-QT for bug-gnu-emacs@gnu.org; Fri, 27 May 2011 15:46:51 -0400 Received: by pzk4 with SMTP id 4so1117803pzk.0 for ; Fri, 27 May 2011 12:46:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:x-debbugs-cc:date:message-id :mime-version:content-type; bh=jVYLe3u5MH74XXpJqSvTGe2Fcyb4ViyBAQ53qq4Qj2o=; b=uZUsEXkxYDXw5uCwOlyy0k5n67mSM1wXX3I1C2JZgnOlSYmJgKj/c6+wSur2JpA1vQ 7xTgAllrwKxYMjhsDHEbsKCIAvEyXxt9nVF/8npb5aCOHo4rgR72MaXGOkMUUI/J5pc6 P4KPSbnUp945wj6Q+6vzWY0jLKIXHJ/Za37IU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:x-debbugs-cc:date:message-id:mime-version :content-type; b=g0G/RVluUVzWPP8eNbSAGFoC27ZuVGGHX+weEE45yYLwhSHPArjYnhCQeXWNgW8bQL 808lDZY5fEhSUTeX76Wvgba8EdWoTAXYQDcnq7uZDJdVxTNFssQ/d09hkxLpWv0hX09Q kXjz0LgvQa6IyqlsEl19t1LO+nCsqZ/gSd9Do= Received: by 10.68.54.170 with SMTP id k10mr1009495pbp.522.1306525610936; Fri, 27 May 2011 12:46:50 -0700 (PDT) Received: from th041091.ip.tsinghua.edu.cn (th041109.ip.tsinghua.edu.cn [59.66.41.109]) by mx.google.com with ESMTPS id g1sm144964pbj.3.2011.05.27.12.46.49 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 May 2011 12:46:50 -0700 (PDT) From: Leo To: bug-gnu-emacs@gnu.org Subject: 23.3.50; [PATCH] Fix a bug in url-cookie X-Debbugs-CC: Stefan Monnier Date: Sat, 28 May 2011 03:46:46 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.2 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.2 (-----) 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) ------------=_1306637282-2607-1--