all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* url-http.el: redirection to partial URL with a proxy
@ 2005-11-14 15:11 Klaus Straubinger
  2005-11-14 18:17 ` Paul Pogonyshev
  0 siblings, 1 reply; 5+ messages in thread
From: Klaus Straubinger @ 2005-11-14 15:11 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-11-18 16:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-14 15:11 url-http.el: redirection to partial URL with a proxy Klaus Straubinger
2005-11-14 18:17 ` Paul Pogonyshev
2005-11-18  3:51   ` Stefan Monnier
2005-11-18  7:28     ` Lennart Borgman
2005-11-18 16:55       ` Stefan Monnier

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.