aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-05-08 10:59:40 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-05-08 10:59:40 +0000
commite84c7db0497478b41f435f047d7b0e75b9289bb6 (patch)
tree077d8ad5268d9da301f6e1e4a384020b8159bc4c /lib/multi.c
parent9ef7b6afe23e5f001645d20ac058fc6b37fbac58 (diff)
- Constantine Sapuntzakis fixed bug report #2784055
(http://curl.haxx.se/bug/view.cgi?id=2784055) identifying a problem to connect to SOCKS proxies when using the multi interface. It turned out to almost not work at all previously. We need to wait for the TCP connect to be properly verified before doing the SOCKS magic. There's still a flaw in the FTP code for this.
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 95d386f85..c5712f619 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1055,9 +1055,16 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
easy->result = Curl_is_connected(easy->easy_conn,
FIRSTSOCKET,
&connected);
- if(connected)
- easy->result = Curl_protocol_connect(easy->easy_conn,
- &protocol_connect);
+ if(connected) {
+ /* see if we need to do any proxy magic first once we connected */
+ easy->result = Curl_connected_proxy(easy->easy_conn);
+
+ if(!easy->result)
+ /* if everything is still fine we do the protocol-specific connect
+ setup */
+ easy->result = Curl_protocol_connect(easy->easy_conn,
+ &protocol_connect);
+ }
if(CURLE_OK != easy->result) {
/* failure detected */