summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorVinicius Jose Latorre <viniciusjl@ig.com.br>2007-08-09 01:42:13 +0000
committerVinicius Jose Latorre <viniciusjl@ig.com.br>2007-08-09 01:42:13 +0000
commit0ba39347d9a752fa2be9b575f2f46422448d7d58 (patch)
treef00a2143213ca0432bd05e6baa130269c3bb4e36 /lisp
parentd3509e50815052654e5ced830f898a9aed211308 (diff)
downloademacs-0ba39347d9a752fa2be9b575f2f46422448d7d58.tar.gz
username and password default
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/url/url-auth.el8
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3491f9f5df7..783281b3012 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el
index c57a96cc81b..45b78e51f90 100644
--- a/lisp/url/url-auth.el
+++ b/lisp/url/url-auth.el
@@ -68,7 +68,9 @@ instead of the pathname inheritance method."
(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 @@ instead of the pathname inheritance method."
(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