diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2009-11-08 05:32:48 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2009-11-08 05:32:48 +0000 |
commit | c98f55cad972684a1d89b0021f48986bd0d92331 (patch) | |
tree | b8f0d178f18d51584b8743dd565d0167cde8a4a3 /lisp/url | |
parent | bedd8a58d891cda65802614838c353c0dbbc9900 (diff) | |
download | emacs-c98f55cad972684a1d89b0021f48986bd0d92331.tar.gz |
* url-http.el (url-http-handle-authentication): Use proxy server,
if any, for authentication (Bug#4883).
Diffstat (limited to 'lisp/url')
-rw-r--r-- | lisp/url/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/url/url-http.el | 15 |
2 files changed, 15 insertions, 5 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 799fddc886e..91cafbb8cce 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2009-11-08 Kai Tetzlaff <kai.tetzlaff@web.de> (tiny change) + + * url-http.el (url-http-handle-authentication): Use proxy server, + if any, for authentication (Bug#4883). + 2009-11-03 Stefan Monnier <monnier@iro.umontreal.ca> * url-util.el (url-insert-entities-in-string): diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index d9be187328f..7bd8a7a6739 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -315,12 +315,16 @@ This allows us to use `mail-fetch-field', etc." '("basic"))) (type nil) (url (url-recreate-url url-current-object)) - (url-basic-auth-storage 'url-http-real-basic-auth-storage) + (auth-url (url-recreate-url + (if (and proxy (boundp 'url-http-proxy)) + url-http-proxy + url-current-object))) + (url-basic-auth-storage (if proxy + ;; Cheating, but who cares? :) + 'url-http-proxy-basic-auth-storage + 'url-http-real-basic-auth-storage)) auth (strength 0)) - ;; Cheating, but who cares? :) - (if proxy - (setq url-basic-auth-storage 'url-http-proxy-basic-auth-storage)) ;; find strongest supported auth (dolist (this-auth auths) @@ -347,7 +351,8 @@ This allows us to use `mail-fetch-field', etc." " send it to " url-bug-address ".<hr>") (setq status t)) (let* ((args (url-parse-args (subst-char-in-string ?, ?\; auth))) - (auth (url-get-authentication url (cdr-safe (assoc "realm" args)) + (auth (url-get-authentication auth-url + (cdr-safe (assoc "realm" args)) type t args))) (if (not auth) (setq success t) |