cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re[2]: Diegst and NTLM authentication ignore CURLOPT_PORT

From: Kirill Senoshenko <skirill_at_itelsib.com>
Date: Mon, 26 May 2008 13:50:21 +0700

On Monday, May 26, 2008 1:43:55 PM tetetest tetetest wrote:

> * Kirill Senoshenko <skirill_at_itelsib.com> [Mon, 26 May 2008 11:04:24
> +0700]:

>> 2) Let me also ask for advice. The intent is to use cURL as a client
>> library for monitoring HTTP resources. A client makes test connections
>> on schedule to simulate user actions and to check whether the resource
>> is available. It is correct to consider each connection attempt in
>> isolation and to use a new HTTP connection for it to trap problems
>> with DNS, TCP stack etc. that may get hidden when reusing the
>> connection.

>> [skip] ... Can I
>> avoid this and ask cURL or the server to close the connection after
>> full exchange including the authentication stage and what API calls
>> would achieve this goal?

> The best way I can think of is to use a separate easy handle for each
> connection.

> Thus you'll avoid problems with cached connections (and, hopefully, with
> DNS cache too, though I am not quite sure in this case).

> As the docs say, curl_easy_init() is quite cheap, so there is no
> performance penalty. Then, curl_easy_cleanup() cleans up all data and
> closes all persistent connections.

That makes sense. Thank you.

Kirill
Received on 2008-05-26