From 4a42e5cdaa344755c6bf5317908849619f61798b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 28 Apr 2011 09:39:33 +0200 Subject: multi-socks: fix connect to proxy When connecting to a socks or similar proxy we do the proxy handshake at once when we know the TCP connect is completed and we only consider the "connection" complete after the proxy handshake. This fixes test 564 which is now no longer considered disabled. Reported by: Dmitri Shubin Bug: http://curl.haxx.se/mail/lib-2011-04/0127.html --- lib/connect.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/connect.c') diff --git a/lib/connect.c b/lib/connect.c index 2cd8cd39c..732fc6721 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -698,7 +698,13 @@ CURLcode Curl_is_connected(struct connectdata *conn, if(WAITCONN_CONNECTED == rc) { if(verifyconnect(sockfd, &error)) { - /* we are connected, awesome! */ + /* we are connected with TCP, awesome! */ + + /* see if we need to do any proxy magic first once we connected */ + code = Curl_connected_proxy(conn); + if(code) + return code; + conn->bits.tcpconnect = TRUE; *connected = TRUE; Curl_pgrsTime(data, TIMER_CONNECT); /* connect done */ -- cgit v1.2.3