[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 629068a: Fix fetching URLs with stuff that looks li
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 629068a: Fix fetching URLs with stuff that looks like HTTP headers |
Date: |
Wed, 14 Aug 2019 10:54:52 -0400 (EDT) |
branch: master
commit 629068a89d1b2a7babbed7d3f5778834a970de16
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix fetching URLs with stuff that looks like HTTP headers
* lisp/url/url-http.el (url-http-parse-headers): Narrow the
buffer to the headers at the beginning to make sure
url-handle-content-transfer-encoding uses the correct
headers. (Bug#37023)
---
lisp/url/url-http.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 9b69077..94d1ba9 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -949,6 +949,10 @@ should be shown to the user."
class url-http-response-status)))
(if (not success)
(url-mark-buffer-as-dead buffer)
+ ;; Narrow the buffer for url-handle-content-transfer-encoding to
+ ;; find only the headers relevant to this transaction.
+ (and (not (buffer-narrowed-p)
+ (mail-narrow-to-head)))
(url-handle-content-transfer-encoding))
(url-http-debug "Finished parsing HTTP headers: %S" success)
(widen)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 629068a: Fix fetching URLs with stuff that looks like HTTP headers,
Eli Zaretskii <=