]> git.eshelyaron.com Git - emacs.git/commitdiff
(url-http-connection-opened): New variable.
authorChong Yidong <cyd@stupidchicken.com>
Sun, 4 Feb 2007 00:20:59 +0000 (00:20 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 4 Feb 2007 00:20:59 +0000 (00:20 +0000)
(url-http): Initialize it.
(url-http-async-sentinel): Don't try changing sentinels.
Run url-http-end-of-document-sentinel if necessary.

lisp/url/ChangeLog
lisp/url/url-http.el

index 0125d4b0bfa8bc4fc50896ce8e0dcbc1db9f9cf4..96529b92385553343eb600872b0891cc4559aa5f 100644 (file)
@@ -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.
index eb193f1c7a62e1617184243b088075dfd9959aaf..1d4d64f0e4d354b04b6c50508a82c7dbe473df44 100644 (file)
@@ -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 @@ CBARGS as the arguments."
                       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 @@ CBARGS as the arguments."
              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 @@ CBARGS as the arguments."
   ;; 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)