diff options
| author | Lars Ingebrigtsen | 2019-09-24 10:43:28 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-09-24 10:43:32 +0200 |
| commit | f9f8dcae704b14fde484d7bfd8805d2cd3e5ab5d (patch) | |
| tree | 309d767306fccf35f014d97368572563efbae54c | |
| parent | 881f6209306ed59284eb04b3812536b7a2b91595 (diff) | |
| download | emacs-f9f8dcae704b14fde484d7bfd8805d2cd3e5ab5d.tar.gz emacs-f9f8dcae704b14fde484d7bfd8805d2cd3e5ab5d.zip | |
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).
| -rw-r--r-- | lisp/url/url-http.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index a6963cef701..31c866bd664 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el | |||
| @@ -551,8 +551,9 @@ work correctly." | |||
| 551 | ;; display a file buffer even if the URL does not exist and | 551 | ;; display a file buffer even if the URL does not exist and |
| 552 | ;; 'url-retrieve-synchronously' returns 404 or whatever. | 552 | ;; 'url-retrieve-synchronously' returns 404 or whatever. |
| 553 | (unless (or visit | 553 | (unless (or visit |
| 554 | (and (>= url-http-response-status 200) | 554 | (or (and (>= url-http-response-status 200) |
| 555 | (< url-http-response-status 300))) | 555 | (< url-http-response-status 300)) |
| 556 | (= url-http-response-status 304))) ; "Not modified" | ||
| 556 | (let ((desc (nth 2 (assq url-http-response-status url-http-codes)))) | 557 | (let ((desc (nth 2 (assq url-http-response-status url-http-codes)))) |
| 557 | (kill-buffer buffer) | 558 | (kill-buffer buffer) |
| 558 | ;; Signal file-error per bug#16733. | 559 | ;; Signal file-error per bug#16733. |