From: Lars Ingebrigtsen Date: Fri, 21 Jan 2022 14:22:24 +0000 (+0100) Subject: Disable background image fetching from asking for passwords X-Git-Tag: emacs-29.0.90~2877^2~8 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=adf00298b60e87f76c64b1ba68c0424df55982e1;p=emacs.git Disable background image fetching from asking for passwords * lisp/url/url-queue.el (url-queue-start-retrieve): Inhibit prompting for passwords from these background requests. --- diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el index 8741bca9423..d353f0c0117 100644 --- a/lisp/url/url-queue.el +++ b/lisp/url/url-queue.el @@ -155,14 +155,19 @@ The variable `url-queue-timeout' sets a timeout." (defun url-queue-start-retrieve (job) (setf (url-queue-buffer job) (ignore-errors - (with-current-buffer (if (buffer-live-p (url-queue-context-buffer job)) + (with-current-buffer (if (buffer-live-p + (url-queue-context-buffer job)) (url-queue-context-buffer job) (current-buffer)) - (let ((url-request-noninteractive t)) - (url-retrieve (url-queue-url job) - #'url-queue-callback-function (list job) - (url-queue-silentp job) - (url-queue-inhibit-cookiesp job))))))) + (let ((url-request-noninteractive t) + ;; This will disable querying the user for + ;; credentials if one of the things we're fetching + ;; in the background return a header requesting it. + (url-request-extra-headers '(("Authorization" . "")))) + (url-retrieve (url-queue-url job) + #'url-queue-callback-function (list job) + (url-queue-silentp job) + (url-queue-inhibit-cookiesp job))))))) (defun url-queue-prune-old-entries () (let (dead-jobs)