aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-06-14 14:42:21 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-06-14 14:42:21 +0000
commitb691102ec7a0409d831dff01d2d7075d56dd7516 (patch)
tree274f2180a4ed202f3583a785c6949d281c206688 /lib/multi.c
parent2785fe7f6121589dee0a7e49b7cdea5649fac3bd (diff)
Shmulik Regev fixed a flaw in the multi interface that occurred when doing
HTTP CONNECT over a proxy
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/multi.c b/lib/multi.c
index bbcf6319e..5e91a5e7c 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1007,8 +1007,15 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
if(!protocol_connect) {
/* We have a TCP connection, but 'protocol_connect' may be false
and then we continue to 'STATE_PROTOCONNECT'. If protocol
- connect is TRUE, we move on to STATE_DO. */
- multistate(easy, CURLM_STATE_PROTOCONNECT);
+ connect is TRUE, we move on to STATE_DO.
+ BUT if we are using a proxy we must change to WAITPROXYCONNECT
+ */
+#ifndef CURL_DISABLE_HTTP
+ if (easy->easy_conn->bits.tunnel_connecting)
+ multistate(easy, CURLM_STATE_WAITPROXYCONNECT);
+ else
+#endif
+ multistate(easy, CURLM_STATE_PROTOCONNECT);
}
else {
/* after the connect has completed, go WAITDO */