cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Questions about reusing connections

From: Georg Horn <horn_at_koblenz-net.de>
Date: Fri, 16 Nov 2001 13:14:52 +0100

On Fri, Nov 16, 2001 at 12:12:42PM +0100, Daniel Stenberg wrote:
> On Fri, 16 Nov 2001, Georg Horn wrote:
>
> > 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?
>
> Setting COOKIE to NULL would disable it. It should then not send a cookie
> line at all. Setting it to "" will probably make it send an empty "Cookie:"
> header.

Ok, i'll try this. I think this would require modifications to the perl
interface too. If you give undef to a perl function, you get an empty string
in the perl xs.

> > - Why does libcurl sum up the times for TIMER_NAMELOOKUP, TIMER_CONNECT
> > and TIMER_PRETRANSFER?
>
> Because no one ever made it work differently.

Aha... ;-)

> > 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.
>
> I agree with you. Care to make a patch fo this?

Yes, that shouldn't be to different.

> > - 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?
>
> It is the point when the (final) request has been sent, when it goes into
> "waiting for data to arrive" mode.

Wouldn't it make sense to change this? Or to add another timer that gives us
the time how long libcurl "waited for data to arrive"? It would represent
the time the application spent with database requests or other stuff before
sending the page (plus some network latencies...)?

Bye,
Georg
Received on 2001-11-16