changeset 72958:3b2d4cd42aaa

lisp/url/url-methods.el: Fix format error when http_proxy is empty string 2006-09-18 Michael Olson <mwolson@gnu.org> * 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 <mwolson@gnu.org>
author Miles Bader <miles@gnu.org>
date Mon, 18 Sep 2006 14:16:07 +0000
parents 041eaea6e3f2
children 1a9df4096f4e
files lisp/url/ChangeLog lisp/url/url-methods.el
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/url/ChangeLog	Mon Sep 18 11:13:04 2006 +0000
+++ b/lisp/url/ChangeLog	Mon Sep 18 14:16:07 2006 +0000
@@ -1,3 +1,9 @@
+2006-09-18  Michael Olson  <mwolson@gnu.org>
+
+	* 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  <disumu@x3y2z1.net>
 
 	* url-parse.el (url-recreate-url-attributes): New function, code
--- a/lisp/url/url-methods.el	Mon Sep 18 11:13:04 2006 +0000
+++ b/lisp/url/url-methods.el	Mon Sep 18 14:16:07 2006 +0000
@@ -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