]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Dmitry Kurochkin fixed pipelining over proxy using the multi interface
authorDaniel Stenberg <daniel@haxx.se>
Mon, 8 Sep 2008 12:15:09 +0000 (12:15 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 8 Sep 2008 12:15:09 +0000 (12:15 +0000)
CHANGES
RELEASE-NOTES
lib/multi.c

diff --git a/CHANGES b/CHANGES
index eb11cd91e0b645a8b883df00f50c7ae0216489d0..88ac1547052049e64cbd5875146b6931ed6c2017 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,17 @@
                                   Changelog
 
 Daniel Stenberg (8 Sep 2008)
+- Dmitry Kurochkin patched a problem: I have found bug in pipelining through
+  proxy. I have a transparent proxy. When running with http_proxy environment
+  variable not set my test completes fine (it goes through transparent
+  proxy). When I set http_proxy variable my test hangs after the first
+  downloaded is complete. Looks like the second handle never gets out from
+  WAITDO state.
+
+  The fix: It makes checkPendPipeline move 1 handler from pend pipe to send
+  pipe if pipelining is not supported by server but there are no handles in
+  send and recv pipes.
+
 - Stefan Krause pointed out that libcurl would wrongly send away cookies to
   sites in cases where the cookie clearly has a very old expiry date. The
   condition was simply that libcurl's date parser would fail to convert the
index 3c4885dcb8e7bfea3b1ca46768390f0b247605c2..56b4933ddf3322dad638863233865af98b857e3a 100644 (file)
@@ -20,6 +20,7 @@ This release includes the following bugfixes:
  o NetWare LIBC builds are now largefile feature enabled by default
  o curl_easy_pause() could behave wrongly on unpause
  o cookie with invalid expire dates are now considered expired
+ o HTTP pipelining over proxy
 
 This release includes the following known bugs:
 
@@ -33,6 +34,6 @@ This release would not have looked like this without help, code, reports and
 advice from friends like these:
 
  Keith Mok, Yang Tse, Daniel Fandrich, Guenter Knauf, Dmitriy Sergeyev,
- Linus Nielsen Feltzing, Martin Drasar, Stefan Krause
+ Linus Nielsen Feltzing, Martin Drasar, Stefan Krause, Dmitry Kurochkin
 
         Thanks! (and sorry if I forgot to mention someone)
index f8602e1d64fa375646b6cd044b97e6cb3809b864..70ea38120b139ffe00d969a059abcc2803808a5a 100644 (file)
@@ -1988,11 +1988,13 @@ static int checkPendPipeline(struct connectdata *conn)
   int result = 0;
   struct curl_llist_element *sendhead = conn->send_pipe->head;
 
-  if (conn->server_supports_pipelining) {
-    size_t pipeLen = conn->send_pipe->size + conn->recv_pipe->size;
+  size_t pipeLen = conn->send_pipe->size + conn->recv_pipe->size;
+  if (conn->server_supports_pipelining || pipeLen == 0) {
     struct curl_llist_element *curr = conn->pend_pipe->head;
+    const size_t maxPipeLen =
+      conn->server_supports_pipelining ? MAX_PIPELINE_LENGTH : 1;
 
-    while(pipeLen < MAX_PIPELINE_LENGTH && curr) {
+    while(pipeLen < maxPipeLen && curr) {
       Curl_llist_move(conn->pend_pipe, curr,
                       conn->send_pipe, conn->send_pipe->tail);
       Curl_pgrsTime(curr->ptr, TIMER_PRETRANSFER);
@@ -2000,11 +2002,10 @@ static int checkPendPipeline(struct connectdata *conn)
       curr = conn->pend_pipe->head;
       ++pipeLen;
     }
-    if (result > 0)
-      conn->now = Curl_tvnow();
   }
 
-  if(result) {
+  if (result) {
+    conn->now = Curl_tvnow();
     /* something moved, check for a new send pipeline leader */
     if(sendhead != conn->send_pipe->head) {
       /* this is a new one as head, expire it */