cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: NTLM request loops when CURLOPT_FORBID_REUSE is set

From: Frank Meier <frank.meier_at_ergon.ch>
Date: Fri, 22 Aug 2014 14:16:36 +0200

On 21/06/14 20:35, Daniel Stenberg wrote:
> On Tue, 17 Jun 2014, Frank Meier wrote:
>
>> In our Application we normally do requests without HTTP keepalive
>> (CURLOPT_FRESH_CONNECT and CURLOPT_FORBID_REUSE set to 1).
>>
>> Now when we use NTLM this does not work anymore with this settings. I
>> expected that libcurl would use the same connection for the NTLM
>> authentication (type1) request and the following "real" (type3)
>> request and then would drop the connection.
>
> Yes, this is sort of a known issue. At least I know about it.
>
> NTLM needs to do multiple requests over the same connection but due to
> lack "state awareness", the CURLOPT_FORBID_REUSE will simply close
> connections after a request even if it was the first one in a
> NTLM-series.
>
> Feel free to take a stab at fixing this!
>
Hi again

I finally got around to write a patch for this issue. My solution is to
ignore the forbid reuse flag in case the NTLM authentication handshake
is in progress, according to the NTLM state flag.

cheers Frank

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2014-08-22