curl-users
Questions about reusing connections
Date: Fri, 16 Nov 2001 11:18:54 +0100
Hi,
i just stumbled about some things in libcurl when reusing connections (don't
close a connection with curl_easy_cleanup() after a successful transfer but
just set the options for the next request with curl_easy_setopt() and call
curl_easy_perform() again):
- If the first request requires for example user authentication or a cookie, i
use curl_easy_setopt(curl, CURLOPT_COOKIE, cookies);
But if the next request doesn't require cookies, how can i delete the cookie?
Can i pass in the empty string as in:
curl_easy_setopt(curl, CURLOPT_COOKIE, "");
What does libcurl do after this? Does it send an empty "Cookie:" header, or
no cookie header at all?
- Why does libcurl sum up the times for TIMER_NAMELOOKUP, TIMER_CONNECT and
TIMER_PRETRANSFER? This makes no sense at all for me. If i want to have the
sum of all namelookup times, i can sum up them in my application, but i think
in most cases it is more interesting to have the times of each single
transfer.
- What time is TIMER_PRETRANSFER exactly? Is it the time from the start up to
the point when the request has been sent, or up to the point when the first
byte is about to be read? Theese two can be quite different, if the webserver
has to do complex calculations or database queries.
Bye,
Georg
Received on 2001-11-16