From f316efd97866668388e0de6e2e68ff73f7a1cbb8 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 18 Sep 2006 14:16:07 +0000 Subject: [PATCH] lisp/url/url-methods.el: Fix format error when http_proxy is empty string 2006-09-18 Michael Olson * url-methods.el (url-scheme-register-proxy): Handle case where getenv returns an empty string for http_proxy. This prevents an error when calling `format' later on. --This line, and those below, will be ignored-- Files to commit: lisp/url/ChangeLog lisp/url/url-methods.el This list might be incomplete or outdated if editing the log message was not invoked from an up-to-date changes buffer! Revision: emacs@sv.gnu.org/emacs--devo--0--patch-441 Creator: Michael Olson --- lisp/url/ChangeLog | 6 ++++++ lisp/url/url-methods.el | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index ad3912de67f..fdd735193c9 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,9 @@ +2006-09-18 Michael Olson + + * url-methods.el (url-scheme-register-proxy): Handle case where + getenv returns an empty string for http_proxy. This prevents an + error when calling `format' later on. + 2006-08-31 Diane Murray * url-parse.el (url-recreate-url-attributes): New function, code diff --git a/lisp/url/url-methods.el b/lisp/url/url-methods.el index 6854d62af03..55166ee46f4 100644 --- a/lisp/url/url-methods.el +++ b/lisp/url/url-methods.el @@ -75,6 +75,11 @@ (cur-proxy (assoc scheme url-proxy-services)) (urlobj nil)) + ;; If env-proxy is an empty string, treat it as if it were nil + (when (and (stringp env-proxy) + (string= env-proxy "")) + (setq env-proxy nil)) + ;; Store any proxying information - this will not overwrite an old ;; entry, so that people can still set this information in their ;; .emacs file -- 2.39.2