From: Chong Yidong Date: Mon, 25 Feb 2008 17:11:25 +0000 (+0000) Subject: Revert last fix; subset of last fix recommitted. X-Git-Tag: emacs-pretest-22.1.92~73 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d2b56a4ee80705e7263050b0e81d3fb10e4579e3;p=emacs.git Revert last fix; subset of last fix recommitted. (url-digest-auth): If the 'opaque' argument is not being used, don't add it to the response text. --- diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index adf1a5fabcb..17e03fe2804 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el @@ -158,7 +158,7 @@ instead of hostname:portnum." (setq file (cond (realm realm) ((string-match "/$" file) file) - (t (url-basepath file))) + (t (url-file-directory file))) server (format "%s:%d" server port) byserv (cdr-safe (assoc server url-digest-auth-storage))) (cond @@ -188,18 +188,18 @@ instead of hostname:portnum." (string= data (substring file 0 (length data))))) (setq retval (cdr (car byserv)))) (setq byserv (cdr byserv)))) - (if overwrite - (if (and (not retval) prompt) - (setq user (read-string (url-auth-user-prompt url realm) - (user-real-login-name)) - pass (read-passwd "Password: ") - retval (setq retval - (cons user - (url-digest-auth-create-key - user pass realm - (or url-request-method "GET") - url))) - byserv (assoc server url-digest-auth-storage)) + (if (or (and (not retval) prompt) overwrite) + (progn + (setq user (read-string (url-auth-user-prompt url realm) + (user-real-login-name)) + pass (read-passwd "Password: ") + retval (setq retval + (cons user + (url-digest-auth-create-key + user pass realm + (or url-request-method "GET") + url))) + byserv (assoc server url-digest-auth-storage)) (setcdr byserv (cons (cons file retval) (cdr byserv)))))) (t (setq retval nil)))