cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: connection reuse, NTLM, multi-interface

From: Christopher R. Palmer <crpalmer_at_vivisimo.com>
Date: Fri, 05 Mar 2004 14:53:43 -0500

Daniel Stenberg wrote:

> On Thu, 4 Mar 2004, Christopher R. Palmer wrote:
>>There are three requests sent:
>>
>> 1. unauthenticated request, returns 401 with a "Connection: close".
>> 2. NTLM request sent, server replies with a challenge
>> 3. NTLM response sent, server sends the data
>>
>>In between steps 1 and 2, I am encountering periodic failures where the
>>library tries to re-use the connection. I can fix the problem by changing
>>adding "check->bits.close" to the test on line 1461 of url.c (7.11.0 or 1476
>>of the 20040226 snapshot), making it:
>
>
> Very accurate report and analysis. Thanks for that!
>
> While your suggested work-around probably solves the immediate problem for
> you, it certainly indicates a previous problem in the code. Connections that
> are marked for closure should be removed from the cache. The check you added
> should not be required.

Quite right. As I said, it didn't seem like the right way to fix it. I
mostly posted it to show that this was the problem (and probably the only
problem).

> I haven't had time to write up a proper test case that repeats your problem,
> but I've read some source code and I would ask you to try the attached patch
> to see if it possibly solves the problem for you!

The patch that you posted yesterday seems to work correctly for me. I
patched the 20040302 nightly build and ran my specific example which was
failing a few thousand times without problems.

Thanks!
Chris.
Received on 2004-03-05