diff options
| author | Lars Ingebrigtsen | 2011-02-02 22:22:07 -0800 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2011-02-02 22:22:07 -0800 |
| commit | b301d17489c8584bb60d8d76e93a85b4b2aa5f41 (patch) | |
| tree | b495415358aebda962fdbc6fc83bb450b6d9a719 | |
| parent | 011f86c70faec8ebe3164ac893a59a8490cd8ba7 (diff) | |
| download | emacs-b301d17489c8584bb60d8d76e93a85b4b2aa5f41.tar.gz emacs-b301d17489c8584bb60d8d76e93a85b4b2aa5f41.zip | |
(url-http-wait-for-headers-change-function): Don't move if the callback function has moved point.
| -rw-r--r-- | lisp/url/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/url/url-http.el | 14 |
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 @@ | |||
| 1 | 2011-02-03 Lars Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * url-http.el (url-http-wait-for-headers-change-function): Don't | ||
| 4 | move if the callback function has moved point. | ||
| 5 | |||
| 1 | 2010-12-16 Miles Bader <Miles Bader <miles@gnu.org>> | 6 | 2010-12-16 Miles Bader <Miles Bader <miles@gnu.org>> |
| 2 | 7 | ||
| 3 | * url-cookie.el: Require 'cl when compiling -- it's necessary for | 8 | * 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." | |||
| 1034 | url-http-response-status)) | 1034 | url-http-response-status)) |
| 1035 | (url-http-debug "url-http-wait-for-headers-change-function (%s)" | 1035 | (url-http-debug "url-http-wait-for-headers-change-function (%s)" |
| 1036 | (buffer-name)) | 1036 | (buffer-name)) |
| 1037 | (when (not (bobp)) | 1037 | (let ((end-of-headers nil) |
| 1038 | (let ((end-of-headers nil) | 1038 | (old-http nil) |
| 1039 | (old-http nil) | 1039 | (process-buffer (current-buffer)) |
| 1040 | (content-length nil)) | 1040 | (content-length nil)) |
| 1041 | (when (not (bobp)) | ||
| 1041 | (goto-char (point-min)) | 1042 | (goto-char (point-min)) |
| 1042 | (if (and (looking-at ".*\n") ; have one line at least | 1043 | (if (and (looking-at ".*\n") ; have one line at least |
| 1043 | (not (looking-at "^HTTP/[1-9]\\.[0-9]"))) | 1044 | (not (looking-at "^HTTP/[1-9]\\.[0-9]"))) |
| @@ -1151,8 +1152,9 @@ the end of the document." | |||
| 1151 | 'url-http-simple-after-change-function))))) | 1152 | 'url-http-simple-after-change-function))))) |
| 1152 | ;; We are still at the beginning of the buffer... must just be | 1153 | ;; We are still at the beginning of the buffer... must just be |
| 1153 | ;; waiting for a response. | 1154 | ;; waiting for a response. |
| 1154 | (url-http-debug "Spinning waiting for headers...")) | 1155 | (url-http-debug "Spinning waiting for headers...") |
| 1155 | (goto-char (point-max))) | 1156 | (when (eq process-buffer (current-buffer)) |
| 1157 | (goto-char (point-max))))) | ||
| 1156 | 1158 | ||
| 1157 | ;;;###autoload | 1159 | ;;;###autoload |
| 1158 | (defun url-http (url callback cbargs) | 1160 | (defun url-http (url callback cbargs) |