emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master adf00298b6: Disable background image fetching from asking for pas


From: Lars Ingebrigtsen
Subject: master adf00298b6: Disable background image fetching from asking for passwords
Date: Fri, 21 Jan 2022 09:22:39 -0500 (EST)

branch: master
commit adf00298b60e87f76c64b1ba68c0424df55982e1
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.
---
 lisp/url/url-queue.el | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el
index 8741bca942..d353f0c011 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]