emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master f9f8dca 2/2: Allow url-insert-file-contents to work


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master f9f8dca 2/2: Allow url-insert-file-contents to work on 304 responses
Date: Tue, 24 Sep 2019 04:43:39 -0400 (EDT)

branch: master
commit f9f8dcae704b14fde484d7bfd8805d2cd3e5ab5d
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Allow url-insert-file-contents to work on 304 responses
    
    * lisp/url/url-http.el (url-http--insert-file-helper): If the
    server answers 304 Not modified, then that's not an error
    (bug#26063).
---
 lisp/url/url-http.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index a6963ce..31c866b 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -551,8 +551,9 @@ work correctly."
       ;; display a file buffer even if the URL does not exist and
       ;; 'url-retrieve-synchronously' returns 404 or whatever.
       (unless (or visit
-                  (and (>= url-http-response-status 200)
-                       (< url-http-response-status 300)))
+                  (or (and (>= url-http-response-status 200)
+                           (< url-http-response-status 300))
+                      (= url-http-response-status 304))) ; "Not modified"
         (let ((desc (nth 2 (assq url-http-response-status url-http-codes))))
           (kill-buffer buffer)
           ;; Signal file-error per bug#16733.



reply via email to

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