# HG changeset patch # User Chong Yidong # Date 1170548459 0 # Node ID 9b2905086f4f5a5908f500b812e2c141f4174c56 # Parent 5eb6eb8f4ac91b5813fbc85332c0e3404497a51f (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. diff -r 5eb6eb8f4ac9 -r 9b2905086f4f lisp/url/ChangeLog --- 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 + + * 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 * url-auth.el (url-get-authentication): Fix typo in docstring. diff -r 5eb6eb8f4ac9 -r 9b2905086f4f lisp/url/url-http.el --- 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)