cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Bug with cleaning up connection cache

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 22 Aug 2014 13:14:25 +0200 (CEST)

On Fri, 22 Aug 2014, Paras S wrote:

> The test succeeds

Great!

> but I am seeing a possible error. The "If NTLM is requested in a ..." part
> of the code is in the else condition, when we are going to create a new
> connection (reuse is false), where picked and done will already be 0.

That new code section is placed in the else block there on purpose: it only
runs if a new connection is being setup. As otherwise it'll of course keep the
state it already maintains. NTLM is connection based.

If an NTLM bit is set in ->picked and done is _not_ set, then NTLM is not "in
use" yet on the connection so it shouldn't reset any state. "HTTP auth" in
itself is not strictly associated with specific connections. curl can for
example first figure out which authentications there are on a specific URL and
decide which one to use, but the server closes the connection and then curl
makes its second request on a new connection continuing from where it left
off...

Why do you think this is an error? Can you come up with a test case/scenario
that fails?

> I am not sure if this is because I used the patch on 7.37.1

I don't think this code has changed in any other way since then.

-- 
  / 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-22