cURL / Mailing Lists / curl-library / Single Mail


Re: re-using connection with authentication

From: Daniel Stenberg <>
Date: Sat, 10 Mar 2007 13:32:06 +0100 (CET)

On Wed, 7 Mar 2007, Sigrid Thijs wrote:

> conn->data = old_conn->data; /* **HERE** */

Hm. I'm reading the code and I've tried all test cases with this line removed,
and it seems to work for all test cases. I *believe* that line should not be

> The reason that this worked before is because in version 7.12.1, url.c did
> not contains this line (3603):
> conn->data = old_conn->data

Right, but 7.12.1 is from the dark ages so a bazillion things have changed and
such a comparison isn't really valid.

> I would like to have some feedback on this. Is it not allowed to use
> multiple easy handles when using the same connection?

Yes it is. Your app should not need to know or care about if they use the same
connection or not.

> Are we doing something wrong? Should the same easy handle be used when
> reusing a connection?

Since 7.16.0 (or so), libcurl is keeping the connections in the multi handle
separate from the easy handles so you can get the same connection re-used even
if you use a different easy handle.

> Is it a bug in libcurl?

It certainly looks like a libcurl bug. Does removing that assignment fix your

  Commercial curl and libcurl Technical Support:
Received on 2007-03-10