summaryrefslogtreecommitdiff
path: root/lisp/url
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2011-02-02 22:22:07 -0800
committerLars Ingebrigtsen <larsi@gnus.org>2011-02-02 22:22:07 -0800
commitb301d17489c8584bb60d8d76e93a85b4b2aa5f41 (patch)
treeb495415358aebda962fdbc6fc83bb450b6d9a719 /lisp/url
parent011f86c70faec8ebe3164ac893a59a8490cd8ba7 (diff)
downloademacs-b301d17489c8584bb60d8d76e93a85b4b2aa5f41.tar.gz
(url-http-wait-for-headers-change-function): Don't move if the callback function has moved point.
Diffstat (limited to 'lisp/url')
-rw-r--r--lisp/url/ChangeLog5
-rw-r--r--lisp/url/url-http.el14
2 files changed, 13 insertions, 6 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index a557f8d0e38..446bdc4afdd 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ * url-http.el (url-http-wait-for-headers-change-function): Don't
+ move if the callback function has moved point.
+
2010-12-16 Miles Bader <Miles Bader <miles@gnu.org>>
* url-cookie.el: Require 'cl when compiling -- it's necessary for
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 7b82f114703..07e57cf3301 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -1034,10 +1034,11 @@ the end of the document."
url-http-response-status))
(url-http-debug "url-http-wait-for-headers-change-function (%s)"
(buffer-name))
- (when (not (bobp))
- (let ((end-of-headers nil)
- (old-http nil)
- (content-length nil))
+ (let ((end-of-headers nil)
+ (old-http nil)
+ (process-buffer (current-buffer))
+ (content-length nil))
+ (when (not (bobp))
(goto-char (point-min))
(if (and (looking-at ".*\n") ; have one line at least
(not (looking-at "^HTTP/[1-9]\\.[0-9]")))
@@ -1151,8 +1152,9 @@ the end of the document."
'url-http-simple-after-change-function)))))
;; We are still at the beginning of the buffer... must just be
;; waiting for a response.
- (url-http-debug "Spinning waiting for headers..."))
- (goto-char (point-max)))
+ (url-http-debug "Spinning waiting for headers...")
+ (when (eq process-buffer (current-buffer))
+ (goto-char (point-max)))))
;;;###autoload
(defun url-http (url callback cbargs)