aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
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);
}