diff options
| author | Lars Ingebrigtsen | 2019-05-15 07:12:26 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-05-15 07:12:26 +0200 |
| commit | 4f1df40db36b221e7842bd75d6281922dcb268ee (patch) | |
| tree | c514769342774a9a23fb2bf63eb24ef53d8774ce | |
| parent | 15bd081ce608c9ebdd379dccc728618664d458a6 (diff) | |
| download | emacs-4f1df40db36b221e7842bd75d6281922dcb268ee.tar.gz emacs-4f1df40db36b221e7842bd75d6281922dcb268ee.zip | |
Fix obscure HTTP chunked parsing problem
* lisp/url/url-http.el
(url-http-chunked-encoding-after-change-function): Ensure that we
parse the entire initial chunked header as the length (bug#35658).
| -rw-r--r-- | lisp/url/url-http.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 03b863b69a8..48e29987a51 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el | |||
| @@ -1084,6 +1084,12 @@ the end of the document." | |||
| 1084 | ;; need to spin some more. | 1084 | ;; need to spin some more. |
| 1085 | (url-http-debug "Did not see start of chunk @ %d!" (point)) | 1085 | (url-http-debug "Did not see start of chunk @ %d!" (point)) |
| 1086 | (setq read-next-chunk nil)) | 1086 | (setq read-next-chunk nil)) |
| 1087 | ;; The data we got may have started in the middle of the | ||
| 1088 | ;; initial chunk header, so move back to the start of the | ||
| 1089 | ;; line and re-compute. | ||
| 1090 | (when (= url-http-chunked-counter 0) | ||
| 1091 | (beginning-of-line) | ||
| 1092 | (looking-at regexp)) | ||
| 1087 | (add-text-properties (match-beginning 0) (match-end 0) | 1093 | (add-text-properties (match-beginning 0) (match-end 0) |
| 1088 | (list 'start-open t | 1094 | (list 'start-open t |
| 1089 | 'end-open t | 1095 | 'end-open t |