cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: TIMEOUT and SOCKS5 does not work

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Fri, 20 Aug 2004 10:51:03 +0200 (CEST)

On Thu, 19 Aug 2004 luks_at_likaro.com.ar wrote:

> If the option PROXYTYPE_SOCKS5 is set, CURLOPT_TIMEOUT does not work
> (CURLOPT_CONNECTTIMEOUT work fine),

It is actually a matter of definition, but I guess you are right.

CURLOPT_TIMEOUT will work during the actual TCP connect phase, but not during
the SOCK5 "negotiate" phase. For a user/app, there is no indication on when
the first phase switches to the next.

> and after a time returned finalizes the connection with the message
> (libcurl) "Error message server nothing (not headers, not data) or

Is this the CURLE_GOT_NOTHING code? libcurl has no such plain text error
message.

> (curl client) "Unable to receive initial SOCKS5 response"

This error message is returned if libcurl fails in the SOCKS5 negotiation. It
needs to send and receive data a few times, and this indicates a failure to
read such data. This send/receive phase can't time out - which is a flaw.

I don't have access to any SOCKS proxy. We don't have any SOCKS test cases.
Don't count on me to fix this anytime soon.

I'm very interested in patches that correct this.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-08-20