From: Glenn Morris Date: Sat, 16 Feb 2013 02:05:32 +0000 (-0500) Subject: url-http-wait-for-headers-change-function fix for bug#13598 X-Git-Url: http://git.hcoop.net/bpt/emacs.git/commitdiff_plain/fe2219e20272be72e5c4e8996d531af5489f1002 url-http-wait-for-headers-change-function fix for bug#13598 * lisp/url/url-http.el (url-http-wait-for-headers-change-function): Avoid prematurely finding the end of headers when they arrive line-by-line. --- diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 72842ad188..f8f24de6b6 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,9 @@ +2013-02-16 Glenn Morris + + * url-http.el (url-http-wait-for-headers-change-function): + Avoid prematurely finding the end of headers when they arrive + line-by-line. (Bug#13598) + 2013-02-03 Stefan Monnier * url-cache.el (url-cache-create-filename-using-md5): Don't waste your diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 5dd3a75170..33fc572275 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -1040,7 +1040,9 @@ the end of the document." (setq end-of-headers t url-http-end-of-headers 0 old-http t) - (when (re-search-forward "^\r*$" nil t) + ;; Blank line at end of headers. + (when (re-search-forward "^\r?\n" nil t) + (backward-char 1) ;; Saw the end of the headers (url-http-debug "Saw end of headers... (%s)" (buffer-name)) (setq url-http-end-of-headers (set-marker (make-marker)