Commit 63255710 authored by Chong Yidong's avatar Chong Yidong
Browse files

* url-methods.el (url-scheme--registering-proxy): New variable.

(url-scheme-register-proxy, url-scheme-get-property): Avoid
calling url-scheme-register-proxy in an infloop (Bug#4191).
parent a035f9b0
2009-09-12 Chong Yidong <cyd@stupidchicken.com>
* url-methods.el (url-scheme--registering-proxy): New variable.
(url-scheme-register-proxy, url-scheme-get-property): Avoid
calling url-scheme-register-proxy in an infloop (Bug#4191).
2009-08-22 Glenn Morris <rgm@gnu.org>
* url-file.el (url-file-build-filename):
......
......@@ -65,13 +65,16 @@
"Signal an error for an unknown URL scheme."
(error "Unkown URL scheme: %s" (url-type url)))
(defvar url-scheme--registering-proxy nil)
(defun url-scheme-register-proxy (scheme)
"Automatically find a proxy for SCHEME and put it in `url-proxy-services'."
(let* ((env-var (concat scheme "_proxy"))
(env-proxy (or (getenv (upcase env-var))
(getenv (downcase env-var))))
(cur-proxy (assoc scheme url-proxy-services))
(urlobj nil))
(urlobj nil)
(url-scheme--registering-proxy t))
;; If env-proxy is an empty string, treat it as if it were nil
(when (and (stringp env-proxy)
......@@ -124,7 +127,8 @@ it has not already been loaded."
(if (fboundp loader)
(progn
;; Found the module to handle <scheme> URLs
(url-scheme-register-proxy scheme)
(unless url-scheme--registering-proxy
(url-scheme-register-proxy scheme))
(setq desc (list 'name scheme
'loader loader))
(dolist (cell url-scheme-methods)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment