emacs-pretest-bug
[Top][All Lists]
Advanced

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

url-http does not propagate redirected URL as callback argument


From: Thierry Emery
Subject: url-http does not propagate redirected URL as callback argument
Date: Mon, 23 May 2005 19:02:01 +0200
User-agent: T-gnus/6.17.3 (based on No Gnus v0.3) SEMI/1.14.6 (Maruoka)FLIM/1.14.7 (Sanjō) APEL/10.6 Emacs/22.0.50 (gnu/linux) MULE/5.0 (SAKAKI)

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the address@hidden mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

url-retrieve is called on a "directory" URL without the ending "/" (and
a callback function). The Web server returns a redirection status
(e.g. "301") and the full URL (with the ending "/").
url-http-parse-headers calls url-retrieve with the redirected URL as
first argument, but this redirected URL is not passed on as a callback
argument.  The callback function is then called with the original URL
(without the ending "/").  As a consequence, any relative URLs inside
the retrieved document are misinterpreted by the calling package.

The following patch fixes this problem:

--- url-http.el~        2005-02-14 10:58:33.000000000 +0100
+++ url-http.el 2005-05-23 18:51:39.000000000 +0200
@@ -500,7 +500,8 @@
                 (url-request-data url-http-data)
                 (url-request-extra-headers url-http-extra-headers))
             (url-retrieve redirect-uri url-callback-function
-                          url-callback-arguments)
+                          (list redirect-uri) ;;url-callback-arguments
+                          )
             (url-mark-buffer-as-dead (current-buffer))))))
       (4                               ; Client error
        ;; 400 Bad Request


In GNU Emacs 22.0.50.2 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2005-05-20 on odin
Distributor `The X.Org Foundation', version 11.0.60802000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: address@hidden
  locale-coding-system: iso-8859-15
  default-enable-multibyte-characters: t




reply via email to

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