summaryrefslogtreecommitdiff
path: root/lisp/url/url-auth.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/url/url-auth.el')
-rw-r--r--lisp/url/url-auth.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el
index c57a96cc81b..3c33fd914e5 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
@@ -310,7 +312,7 @@ RATING a rating between 1 and 10 of the strength of the authentication.
url-registered-auth-schemes)))))
(defun url-auth-registered (scheme)
- ;; Return non-nil iff SCHEME is registered as an auth type
+ "Return non-nil if SCHEME is registered as an auth type."
(assoc scheme url-registered-auth-schemes))
(provide 'url-auth)