cURL / Mailing Lists / curl-library / Single Mail

curl-library

setting SSL connection timeout

From: Tom Jerry <catod6_at_gmail.com>
Date: Wed, 15 Nov 2006 18:13:26 +0200

I'm using libcurl 7.15.5 on win32 with openssl 0.9.8d.
I'm trying to do something that in not very conventional, but the behavior
of libcurl in that case is not clear to me.
I'm trying to send a POST request over SSL to a web server (MS IIS) on port
80.
I must mention that this server does not expect to get SSL request on this
port. It's just a test of mine to see how my client behaves on different
cases.

I'm using the multi interface and the request I sent is running for about 7
(!!!) minutes before it is terminated, which is a VERY long time.
I did set the timeout with CURLOPT_TIMEOUT to 5 seconds.
If I change the port to 443, then the request is terminated immediately with
error (SSL_CONNECT_ERROR).

Here is the trace from libcurl when setting it to verbose mode:
11/15/06 17:42:06 INFO [Client=0xB] curl_debug() : Type=0, About
to connect() to 400-01-app port 80
11/15/06 17:42:06 INFO [Client=0xB] curl_debug() : Type=0,
Expire at 187095 / 900000 (3881ms)
11/15/06 17:42:06 INFO [Client=0xB] curl_debug() : Type=0,
Trying 192.168.200.211...
11/15/06 17:42:07 INFO [Client=0xB] curl_debug() : Type=0,
Connected to 400-01-app (192.168.200.211) port 80
11/15/06 17:42:09 INFO [Client=0xB] curl_debug() : Type=0,
SSLv2, Client hello (1):
11/15/06 17:42:09 INFO [Client=0xB] curl_debug() : Type=6, 
11/15/06 17:49:32 INFO [Client=0xB] curl_debug() : Type=0, SSL
connection timeout
11/15/06 17:49:32 INFO [Client=0xB] curl_debug() : Type=0,
Closing connection #0

Can anyone explain it? Is there a way to set the timeout for SSL connection?

Thank you,
Ori.
Received on 2006-11-15