]> git.eshelyaron.com Git - emacs.git/commitdiff
Make chunked encoding trailer detection more compliant
authorJames Stout <james.wolf.stout@gmail.com>
Mon, 28 Dec 2015 19:49:57 +0000 (20:49 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 28 Dec 2015 19:55:36 +0000 (20:55 +0100)
* lisp/url/url-http.el
(url-http-chunked-encoding-after-change-function): Make
trailer detection more compliant (bug#16345).

Copyright-paperwork-exempt: yes

lisp/url/url-http.el

index b65affee7d4df5f9bede81e9a80b3bb5819ef530..c5b6ef3980a9c5bd8d5bf3b5414f40e9570ea06d 100644 (file)
@@ -1056,7 +1056,7 @@ the end of the document."
                  (when (looking-at "\r?\n")
                    (url-http-debug "Removing terminator of last chunk")
                    (delete-region (match-beginning 0) (match-end 0)))
-                 (if (re-search-forward "^\r*$" nil t)
+                 (if (re-search-forward "^\r?\n" nil t)
                      (url-http-debug "Saw end of trailers..."))
                  (if (url-http-parse-headers)
                      (url-http-activate-callback))))))))))