cURL / Mailing Lists / curl-library / Single Mail

curl-library

Timeouts and using CURLOPT_FRESH_CONNECT

From: Andrew Fuller <andrewfuller2k2_at_yahoo.co.uk>
Date: Wed, 26 Nov 2003 16:38:45 +0000 (GMT)

Hi,

I just want to clarify the use of
CURLOPT_FRESH_CONNECT because the docs say only to use
it if you know what it does, and I guess I don't :)

Suppose I use a curl handle to fetch a document which
times out, for example :

Set CURLOPT_TIMEOUT to 5.
Fetch http://domain.com/mypage.jsp?delay=10 (takes
10s)

After this times out, I want to use the same handle to
fetch a document from the same location, but with
different params, eg :
http://domain.com/mypage.jsp?delay=3

At present, the second fetch uses the connection from
the first, and the response I get back is from the
first request.

To correct this, should I set CURLOPT_FRESH_CONNECT to
1 every time a fetch times out? Does this only affect
the next fetch?

rgds
Andrew Fuller

________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
Received on 2003-11-26