[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
url-http.el: redirection to partial URL with a proxy
From: |
Klaus Straubinger |
Subject: |
url-http.el: redirection to partial URL with a proxy |
Date: |
Mon, 14 Nov 2005 16:11:01 +0100 (CET) |
The redirection of a URL retrieval request to a partial (not fully
qualified) URL does not work if the retrieval is attempted with a
proxy connection. The function url-http-parse-headers in url-http.el
constructs a fully qualified URL by using the variable
url-current-object. But this variable contains the proxy URL if a proxy
is used. This leads to a wrong redirection URL.
The following patch solves this problem. It works because
url-http-cookies-sources contains always the original URL as set in the
function url-http. Maybe the variable could be renamed because it is
useful not just for cookie handling.
--- url-http.el.orig 2005-10-21 09:21:56.000000000 +0200
+++ url-http.el 2005-11-14 15:42:07.000000000 +0100
@@ -510,7 +510,9 @@
;; non-fully-qualified URL (ie: /), which royally confuses
;; the URL library.
(if (not (string-match url-nonrelative-link redirect-uri))
- (setq redirect-uri (url-expand-file-name redirect-uri)))
+ (setq redirect-uri
+ (url-expand-file-name redirect-uri
+ url-http-cookies-sources)))
(let ((url-request-method url-http-method)
(url-request-data url-http-data)
(url-request-extra-headers url-http-extra-headers))
--
Klaus Straubinger
- url-http.el: redirection to partial URL with a proxy,
Klaus Straubinger <=