mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
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)
This commit is contained in:
parent
f4974d6fe6
commit
629068a89d
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue