all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmx.net>
Cc: emacs-devel@gnu.org
Subject: Re: help with URL module needed
Date: Tue, 30 Nov 2004 21:49:46 +0200	[thread overview]
Message-ID: <200411302149.46074.pogonyshev@gmx.net> (raw)
In-Reply-To: <200411291601.10780.pogonyshev@gmx.net>

I wrote:
> Hmm...
>
> I think I found a bug in URL module that _might_ be related to the weird
> problem I'm experiencing.
>
> My `url-cookie-storage' variable has cookies listed for my *proxy domain*,
> 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  <pogonyshev@gmx.net>

	* url-http.el (url-http-handle-cookies): Bind `url-current-object'
	to `url-http-cookies-sources' so that cookies are attributed to
	proper domain.
	(url-http): Make local variable `url-http-cookies-sources'.


--- url-http.el	28 Nov 2004 23:58:24 +0200	1.6
+++ url-http.el	30 Nov 2004 21:44:25 +0200	
@@ -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))
-	(cookies2 (mail-fetch-field "Set-Cookie2" nil nil t)))
+	(cookies2 (mail-fetch-field "Set-Cookie2" nil nil t))
+	(url-current-object url-http-cookies-sources))
     (and cookies (url-http-debug "Found %d Set-Cookie headers" (length cookies)))
     (and cookies2 (url-http-debug "Found %d Set-Cookie2 headers" (length cookies2)))
     (while cookies
@@ -1043,7 +1044,8 @@ CBARGS as the arguments."
 		       url-http-process
 		       url-http-method
 		       url-http-extra-headers
-		       url-http-data))
+		       url-http-data
+		       url-http-cookies-sources))
 	  (set (make-local-variable var) nil))
 
 	(setq url-http-method (or url-request-method "GET")
@@ -1055,7 +1057,10 @@ CBARGS as the arguments."
 	      url-http-chunked-counter 0
 	      url-callback-function callback
 	      url-callback-arguments cbargs
-	      url-http-after-change-function 'url-http-wait-for-headers-change-function)
+	      url-http-after-change-function 'url-http-wait-for-headers-change-function
+	      url-http-cookies-sources (if (boundp 'proxy-object)
+					   proxy-object
+					 url-current-object))
 
 	(set-process-buffer connection buffer)
 	(set-process-sentinel connection 'url-http-end-of-document-sentinel)

  reply	other threads:[~2004-11-30 19:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-26 15:32 help with URL module needed Paul Pogonyshev
2004-11-26 16:04 ` Masatake YAMATO
2004-11-26 16:58   ` Paul Pogonyshev
2004-11-28 14:38     ` Paul Pogonyshev
2004-11-28 19:12       ` Andreas Schwab
2004-11-28 22:37         ` Paul Pogonyshev
2004-11-28 22:59           ` Andreas Schwab
2004-11-28 23:12             ` Paul Pogonyshev
2004-11-28 23:43               ` Alex Schroeder
2004-11-29  0:10               ` Andreas Schwab
2004-11-29 14:01                 ` Paul Pogonyshev
2004-11-30 19:49                   ` Paul Pogonyshev [this message]
2004-11-30 21:29                     ` Andreas Schwab
2004-11-29 21:42             ` Thien-Thi Nguyen
2004-11-30  0:35               ` Andreas Schwab
2004-11-30  9:22                 ` Thien-Thi Nguyen
2004-11-30 17:18         ` Mark A. Hershberger
2004-11-26 16:27 ` Thien-Thi Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200411302149.46074.pogonyshev@gmx.net \
    --to=pogonyshev@gmx.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.