[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with URL module needed

From: Paul Pogonyshev
Subject: Re: help with URL module needed
Date: Tue, 30 Nov 2004 21:49:46 +0200
User-agent: KMail/1.4.3

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  <address@hidden>

        * 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 
     (and cookies2 (url-http-debug "Found %d Set-Cookie2 headers" (length 
     (while cookies
@@ -1043,7 +1044,8 @@ CBARGS as the arguments."
-                      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-after-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 via email to

[Prev in Thread] Current Thread [Next in Thread]