[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] NTLM request loops when CURLOPT_FORBID_REUSE is set

From: Frank Meier
Subject: [libmicrohttpd] NTLM request loops when CURLOPT_FORBID_REUSE is set
Date: Tue, 17 Jun 2014 11:58:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0


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.

The problem then is, that libcurl is starting to loop indefinitely unless CURLOPT_TIMEOUT is configured:
1) Libcurl sends request with NTLM type1 header
2) Server sends 401 with NTLM type2 header
3) Libcurl drops connection
4) Libcurl sends again a request with NTLM type1 header (and so on...)

When CURLOPT_FORBID_REUSE is set to 0 everything works fine.

In my opinion the connection should not be dropped after the first request but one can argue, if CURLOPT_FORBID_REUSE is set, this is just what happens. But If so why does it still work when CURLOPT_FRESH_CONNECT is set.

In any case I think libcurl should not start looping and should abort after the second request.

BTW I tested with version 7.37.0 and actual checkout from git

cheers Frank

reply via email to

[Prev in Thread] Current Thread [Next in Thread]