mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
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).
This commit is contained in:
parent
881f620930
commit
f9f8dcae70
1 changed files with 3 additions and 2 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue