--- lib/multi.c	2008-01-16 18:48:37.000000000 +0300
+++ /home/dikk/wd_sys/projects/curl/curl/lib/multi.c	2008-01-16 18:37:47.000000000 +0300
@@ -927,42 +927,46 @@
       if(CURLE_OK == easy->result) {
         /* after init, go CONNECT */
         multistate(easy, CURLM_STATE_CONNECT);
         result = CURLM_CALL_MULTI_PERFORM;
 
         easy->easy_handle->state.used_interface = Curl_if_multi;
       }
       break;
 
     case CURLM_STATE_CONNECT:
       /* Connect. We get a connection identifier filled in. */
       Curl_pgrsTime(easy->easy_handle, TIMER_STARTSINGLE);
       easy->result = Curl_connect(easy->easy_handle, &easy->easy_conn,
                                   &async, &protocol_connect);
 
       if(CURLE_OK == easy->result) {
         /* Add this handle to the send or pend pipeline */
         easy->result = Curl_addHandleToSendOrPendPipeline(easy->easy_handle,
                                                           easy->easy_conn);
         if(CURLE_OK == easy->result) {
-          if (easy->easy_handle->state.is_in_pipeline)
+          if(easy->easy_handle->state.is_in_pipeline) {
             multistate(easy, CURLM_STATE_WAITDO);
+            if(Curl_isHandleAtHead(easy->easy_handle,
+                                   easy->easy_conn->send_pipe))
+              result = CURLM_CALL_MULTI_PERFORM;
+          }
           else {
             if(async)
               /* We're now waiting for an asynchronous name lookup */
               multistate(easy, CURLM_STATE_WAITRESOLVE);
             else {
               /* after the connect has been sent off, go WAITCONNECT unless the
                  protocol connect is already done and we can go directly to
                  WAITDO! */
               result = CURLM_CALL_MULTI_PERFORM;
 
               if(protocol_connect)
                 multistate(easy, CURLM_STATE_WAITDO);
               else {
 #ifndef CURL_DISABLE_HTTP
                 if(easy->easy_conn->bits.tunnel_connecting)
                   multistate(easy, CURLM_STATE_WAITPROXYCONNECT);
                 else
 #endif
                   multistate(easy, CURLM_STATE_WAITCONNECT);
               }
