From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: help with URL module needed Date: Tue, 30 Nov 2004 21:49:46 +0200 Message-ID: <200411302149.46074.pogonyshev@gmx.net> References: <200411261732.12616.pogonyshev@gmx.net> <200411291601.10780.pogonyshev@gmx.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1101844138 15123 80.91.229.6 (30 Nov 2004 19:48:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 30 Nov 2004 19:48:58 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 30 20:48:50 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CZDzW-0001eI-00 for ; Tue, 30 Nov 2004 20:48:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CZE8y-0002vG-Mp for ged-emacs-devel@m.gmane.org; Tue, 30 Nov 2004 14:58:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CZE8q-0002uz-Vw for emacs-devel@gnu.org; Tue, 30 Nov 2004 14:58:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CZE8p-0002uU-Vk for emacs-devel@gnu.org; Tue, 30 Nov 2004 14:58:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CZE8p-0002uR-Si for emacs-devel@gnu.org; Tue, 30 Nov 2004 14:58:27 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1CZDyU-0002AW-HK for emacs-devel@gnu.org; Tue, 30 Nov 2004 14:47:47 -0500 Original-Received: (qmail 32363 invoked by uid 65534); 30 Nov 2004 19:47:42 -0000 Original-Received: from unknown (EHLO localhost.localdomain) (195.50.12.121) by mail.gmx.net (mp007) with SMTP; 30 Nov 2004 20:47:42 +0100 X-Authenticated: #16844820 Original-To: Andreas Schwab User-Agent: KMail/1.4.3 In-Reply-To: <200411291601.10780.pogonyshev@gmx.net> 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: main.gmane.org gmane.emacs.devel:30548 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30548 I wrote: > Hmm... > > I think I found a bug in URL module that _might_ be related to the weir= d > problem I'm experiencing. > > My `url-cookie-storage' variable has cookies listed for my *proxy domai= n*, > not (ru|en).wikipedia.org! As the result, the cookies are not sent, as= URL > module seems to correctly compare domains (i.e. it doesn't compare with= the > proxy.) So, do you care to apply this patch that fixes the _bug_? 2004-11-30 Paul Pogonyshev =09* url-http.el (url-http-handle-cookies): Bind `url-current-object' =09to `url-http-cookies-sources' so that cookies are attributed to =09proper domain. =09(url-http): Make local variable `url-http-cookies-sources'. --- url-http.el=0928 Nov 2004 23:58:24 +0200=091.6 +++ url-http.el=0930 Nov 2004 21:44:25 +0200=09 @@ -342,7 +342,8 @@ This allows us to use `mail-fetch-field' The buffer must already be narrowed to the headers, so mail-fetch-field = will work correctly." (let ((cookies (mail-fetch-field "Set-Cookie" nil nil t)) -=09(cookies2 (mail-fetch-field "Set-Cookie2" nil nil t))) +=09(cookies2 (mail-fetch-field "Set-Cookie2" nil nil t)) +=09(url-current-object url-http-cookies-sources)) (and cookies (url-http-debug "Found %d Set-Cookie headers" (length c= ookies))) (and cookies2 (url-http-debug "Found %d Set-Cookie2 headers" (length= cookies2))) (while cookies @@ -1043,7 +1044,8 @@ CBARGS as the arguments." =09=09 url-http-process =09=09 url-http-method =09=09 url-http-extra-headers -=09=09 url-http-data)) +=09=09 url-http-data +=09=09 url-http-cookies-sources)) =09 (set (make-local-variable var) nil)) =20 =09(setq url-http-method (or url-request-method "GET") @@ -1055,7 +1057,10 @@ CBARGS as the arguments." =09 url-http-chunked-counter 0 =09 url-callback-function callback =09 url-callback-arguments cbargs -=09 url-http-after-change-function 'url-http-wait-for-headers-chang= e-function) +=09 url-http-after-change-function 'url-http-wait-for-headers-chang= e-function +=09 url-http-cookies-sources (if (boundp 'proxy-object) +=09=09=09=09=09 proxy-object +=09=09=09=09=09 url-current-object)) =20 =09(set-process-buffer connection buffer) =09(set-process-sentinel connection 'url-http-end-of-document-sentinel)