diff -w -u C:\sources\curl-7.16.2\lib/multi.c ./multi.c
--- C:\sources\curl-7.16.2\lib/multi.c	2007-06-21 16:48:32.622025600 -0400
+++ ./multi.c	2007-07-02 09:06:04.623347200 -0400
@@ -1359,7 +1359,10 @@
       }
     }
 
-  } while (easy->easy_handle->change.url_changed);
+  } while (0);
+
+  if (easy->easy_handle->change.url_changed || (easy->easy_conn && Curl_ssl_data_pending(easy->easy_conn, FIRSTSOCKET)))
+    return CURLM_CALL_MULTI_PERFORM;
 
   if ((CURLM_STATE_COMPLETED == easy->state) && !easy->msg) {
     if(easy->easy_handle->dns.hostcachetype == HCACHE_MULTI) {
diff -w -u C:\sources\curl-7.16.2\lib/transfer.c ./transfer.c
--- C:\sources\curl-7.16.2\lib/transfer.c	2007-06-21 14:53:58.324866600 -0400
+++ ./transfer.c	2007-06-28 21:15:45.870207300 -0400
@@ -342,7 +342,7 @@
        the stream was rewound (in which case we have data in a
        buffer) */
     if((k->keepon & KEEP_READ) &&
-       ((select_res & CSELECT_IN) || conn->bits.stream_was_rewound)) {
+       ((select_res & CSELECT_IN) || conn->bits.stream_was_rewound) || data_pending(conn)) {
       /* read */
       bool is_empty_data = FALSE;
 
@@ -849,6 +849,7 @@
               if(contentlength >= 0) {
                 k->size = contentlength;
                 k->maxdownload = k->size;
+                Curl_pgrsSetDownloadSize(data, k->size);
               }
               else {
                 /* Negative Content-Length is really odd, and we know it
@@ -1344,7 +1345,7 @@
           k->keepon &= ~KEEP_READ;
         }
 
-      } while(data_pending(conn));
+      } while(0);
 
     } /* if( read from socket ) */
 
