diff --git a/CHANGES b/CHANGES index 52b50a8eb7f27842f44d31085d3aded3819c8916..d0e41a5d419a000503fe1e5a8b1e3d2f012bd8e4 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,11 @@ Changelog +Daniel Stenberg (9 May 2008) +- Stefan Krause reported a busy-looping case when using the multi interface + and doing CONNECT to a proxy. The app would then busy-loop until the proxy + completed its response. + Michal Marek (9 May 2008) - Make Curl_write and it's callees accept a const pointer, in preparation of tetetest's patch for curl_easy_send() diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f2565fae238cfc447fe01f5e30fef059be0350b9..1e85e25fc438a85471eef54480a97052adc85946 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -32,6 +32,7 @@ This release includes the following bugfixes: o configure detecting debug-enabled c-ares o microsecond resolution keys for internal splay trees o krb4 and krb5 ftp segfault + o multi interface busy loop for CONNECT requests This release includes the following known bugs: diff --git a/lib/multi.c b/lib/multi.c index 48e7c410a6909a0b8b5f3b93cf1ef52ccfdca446..10341808fd1d1e4c1a1f1b83a6f7b8fe5fae75b6 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -722,6 +722,12 @@ static int waitconnect_getsock(struct connectdata *conn, return GETSOCK_BLANK; sock[0] = conn->sock[FIRSTSOCKET]; + + /* when we've sent a CONNECT to a proxy, we should rather wait for the + socket to become readable to be able to get the response headers */ + if(conn->bits.tunnel_connecting) + return GETSOCK_READSOCK(0); + return GETSOCK_WRITESOCK(0); }