Mercurial > emacs
changeset 75662:9b2905086f4f
(url-http-connection-opened): New variable.
(url-http): Initialize it.
(url-http-async-sentinel): Don't try changing sentinels.
Run url-http-end-of-document-sentinel if necessary.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 04 Feb 2007 00:20:59 +0000 |
parents | 5eb6eb8f4ac9 |
children | f8e4f51b4854 |
files | lisp/url/ChangeLog lisp/url/url-http.el |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/url/ChangeLog Sat Feb 03 23:39:36 2007 +0000 +++ b/lisp/url/ChangeLog Sun Feb 04 00:20:59 2007 +0000 @@ -1,3 +1,10 @@ +2007-02-04 Chong Yidong <cyd@stupidchicken.com> + + * url-http.el (url-http-connection-opened): New variable. + (url-http): Initialize it. + (url-http-async-sentinel): Don't try changing sentinels. + Run url-http-end-of-document-sentinel if necessary. + 2007-01-29 Juanma Barranquero <lekktu@gmail.com> * url-auth.el (url-get-authentication): Fix typo in docstring.
--- a/lisp/url/url-http.el Sat Feb 03 23:39:36 2007 +0000 +++ b/lisp/url/url-http.el Sun Feb 04 00:20:59 2007 +0000 @@ -30,6 +30,7 @@ (defvar url-http-extra-headers) (defvar url-http-target-url) (defvar url-http-proxy) +(defvar url-http-connection-opened) (require 'url-gw) (require 'url-util) (require 'url-parse) @@ -1118,6 +1119,7 @@ url-http-extra-headers url-http-data url-http-target-url + url-http-connection-opened url-http-proxy)) (set (make-local-variable var) nil)) @@ -1132,6 +1134,7 @@ url-callback-arguments cbargs url-http-after-change-function 'url-http-wait-for-headers-change-function url-http-target-url url-current-object + url-http-connection-opened nil url-http-proxy url-using-proxy) (set-process-buffer connection buffer) @@ -1155,8 +1158,10 @@ ;; has occurred. (with-current-buffer (process-buffer proc) (cond + (url-http-connection-opened + (url-http-end-of-document-sentinel proc why)) ((string= (substring why 0 4) "open") - (set-process-sentinel proc 'url-http-end-of-document-sentinel) + (setq url-http-connection-opened t) (process-send-string proc (url-http-create-request))) (t (setf (car url-callback-arguments)