aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-05-09 12:59:24 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-05-09 12:59:24 +0000
commit0510759bc4902f6b15b476f9ae94403beb9a02cb (patch)
tree1640aa1fed0e04bae03adac52c5a8af4a5726cbd /lib
parent6d5cca5ed02f256dc8ee612c7b34cfdff9b87189 (diff)
- 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.
Diffstat (limited to 'lib')
-rw-r--r--lib/multi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 48e7c410a..10341808f 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);
}