From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Klaus Straubinger Newsgroups: gmane.emacs.devel Subject: Re: tiny changes to url-cookie.el Date: Mon, 27 Jun 2005 17:01:56 +0200 (CEST) Message-ID: References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1119885572 25317 80.91.229.2 (27 Jun 2005 15:19:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2005 15:19:32 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 27 17:19:26 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DmvNP-0004CT-PN for ged-emacs-devel@m.gmane.org; Mon, 27 Jun 2005 17:18:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DmvV4-0007Uo-Mq for ged-emacs-devel@m.gmane.org; Mon, 27 Jun 2005 11:26:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DmvML-0003Sb-EV for emacs-devel@gnu.org; Mon, 27 Jun 2005 11:17:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DmvKr-0002p0-01 for emacs-devel@gnu.org; Mon, 27 Jun 2005 11:15:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DmvKb-0002ag-2I for emacs-devel@gnu.org; Mon, 27 Jun 2005 11:15:29 -0400 Original-Received: from [155.56.68.170] (helo=smtpde02.sap-ag.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DmvBm-0005kP-H5 for emacs-devel@gnu.org; Mon, 27 Jun 2005 11:06:22 -0400 Original-Received: from sap-ag.de (smtpde02) by smtpde02.sap-ag.de (out) with ESMTP id RAA16498 for ; Mon, 27 Jun 2005 17:01:56 +0200 (MESZ) Original-To: emacs-devel@gnu.org In-Reply-To: X-Mailer: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 X-SAP: out X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:39659 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39659 [url-cookie-retrieve] > That function does not explain very clearly what it is supposed to do. > What does the argument PATH mean? The whole topic is explained in more detail in the document "http://home.netscape.com/newsref/std/cookie_spec.html" which is referenced at the beginning of the file url-cookie.el. In short, the PATH argument is meant to be the local part of the internet site because sites maybe want to set and retrieve different cookies for different parts of their site. > Could you show me some examples of it? Why is it wrong to add ^? I thought it would require paths starting from "/" (the site's root) which could not always be true. But now I have found the root of the problems I had with cookie retrieval: The function url-http-create-request which builds the HTTP request calls url-cookie-generate-header-lines already with the wrong path - but only when dealing with a proxy. It sets a local variable like this (real-fname (if proxy-obj (url-recreate-url proxy-obj) (url-filename url))) i.e., if a proxy object is defined, the whole URL is used instead of only the local part after the host name. The function url-filename is used to get this part (unfortunately its name does not fit very well its purpose in this case) and should be applied in the proxy case as well. Therefore, I think the two lines above should be replaced by (real-fname (url-filename (if proxy-obj proxy-obj url))) and no change to url-cookie-retrieve should be necessary. Sorry for the confusion. -- Klaus Straubinger