cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Bug with cleaning up connection cache

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 20 Aug 2014 16:32:36 +0200 (CEST)

On Wed, 20 Aug 2014, Paras S wrote:

> On calling Curl_disconnect, the current easy object's state is modified,
> even if conn_candidate may have nothing to do with the current easy object.
> state.authhost, state.authproxy and req.newurl are reset if the required
> conditions are met by conn_candidate, and not necessarily by conn.

Thanks for pointing this out!

Perhaps we should move over some of those state variables to the connectdata
struct instead. The comment in there also gives a clue about that mixed nature
and the auth-clearing stuff is actually only made if the connection used ntlm
of some sort...

Secondly, the freeing of the URL is probably wrong to do at that point as it
isn't strictly related to the connection at all. I'll see if I can move away
that to start with...

Do you have a specific use case for when this causes problems? It could help
to make a test case for it so that a restructure of the code can be tested
against a good scenario.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-20