Package: w3-url-e21
Version: 2001.11.08-7
Severity: normal
Tags: patch
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.
N.B. I have also reported this as a GNU Emacs bug, however as w3-url-e21
is not derived from the CVS GNU Emacs URL package, i submit it here
as well.
For Debian GNU/Linux, this bug notably affects the use of the w3-el-e21
package (as reported by Tim X on gnu.emacs.help in thread "Emacs 21
and w3 on Debian"), e.g.:
/usr/bin/emacs -q
M-x w3-fetch
http://www.une.edu.au/itd
then click on "About ITD" -> several images are not found and all
relative links inside the page are unusable as they are expanded wrt
http://www.une.edu.au/ instead of http://www.une.edu.au/itd/
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11.3-20050315121628
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
Versions of packages w3-url-e21 depends on:
ii emacs21 21.4a-1 The GNU Emacs editor
--- url-http.el.debian 2003-02-06 01:31:50.000000000 +0100
+++ url-http.el 2005-05-23 17:45:15.000000000 +0200
@@ -461,7 +461,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))))))
((= class 4) ; Client error
;; 400 Bad Request