changeset 82333:ad137165d9cc

username and password default
author Vinicius Jose Latorre <viniciusjl@ig.com.br>
date Thu, 09 Aug 2007 01:42:13 +0000
parents 25e98747a502
children 081f1ab64053
files lisp/ChangeLog lisp/url/url-auth.el
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Aug 08 16:38:32 2007 +0000
+++ b/lisp/ChangeLog	Thu Aug 09 01:42:13 2007 +0000
@@ -1,3 +1,8 @@
+2007-08-09  Edward O'Connor  <hober0@gmail.com> (tiny change)
+
+        * url/url-auth.el (url-basic-auth): When prompting for username
+          and password, default to the username and password in the URL.
+
 2007-08-08  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 
 	* ps-print.el (ps-default-fg, ps-default-bg): Docstring fix.
--- a/lisp/url/url-auth.el	Wed Aug 08 16:38:32 2007 +0000
+++ b/lisp/url/url-auth.el	Thu Aug 09 01:42:13 2007 +0000
@@ -68,7 +68,9 @@
 	 (server (url-host href))
 	 (port (url-port href))
 	 (path (url-filename href))
-	 user pass byserv retval data)
+	 (user (url-user href))
+	 (pass (url-password href))
+	 byserv retval data)
     (setq server (format "%s:%d" server port)
 	  path (cond
 		(realm realm)
@@ -79,8 +81,8 @@
     (cond
      ((and prompt (not byserv))
       (setq user (read-string (url-auth-user-prompt url realm)
-			      (user-real-login-name))
-	    pass (read-passwd "Password: "))
+			      (or user (user-real-login-name)))
+	    pass (read-passwd "Password: " nil (or pass "")))
       (set url-basic-auth-storage
 	   (cons (list server
 		       (cons path