summaryrefslogtreecommitdiff
path: root/lisp/url
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-02-15 21:05:32 -0500
committerGlenn Morris <rgm@gnu.org>2013-02-15 21:05:32 -0500
commitfe2219e20272be72e5c4e8996d531af5489f1002 (patch)
tree7f479e387898808bf3b1f64eebec1e280716ec55 /lisp/url
parentbb9dfee1d6d0e67b3564d25580f144d25284c0ea (diff)
downloademacs-fe2219e20272be72e5c4e8996d531af5489f1002.tar.gz
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.
Diffstat (limited to 'lisp/url')
-rw-r--r--lisp/url/ChangeLog6
-rw-r--r--lisp/url/url-http.el4
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 72842ad188d..f8f24de6b68 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,9 @@
+2013-02-16 Glenn Morris <rgm@gnu.org>
+
+ * 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 <monnier@iro.umontreal.ca>
* 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 5dd3a751702..33fc5722759 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)