curl / Mailing Lists / curl-library / Single Mail


NTLM and Squid Proxy Server

From: Hölzl, Dominik <>
Date: Fri, 11 Aug 2017 09:21:47 +0000


When I use cURL (Library from a C++-Program on Windows 10, cURL version 7.49.1) and connecting to an IIS Web Server using NTLM Authentication (with Username+Password, HTTP) over a Squid Proxy Server (3.5.20) and re-using the CURL-handle for a second request, the second request fails with CURLE_SEND_ERROR (55).

The Server responds to the first request with "Connection: keep-alive", and all data defined by the request content-length and response content-length headers are completely written and read, so I assume that the connection can be safely reused for continuous requests.
The request-headers contain "Connection: Keep-Alive" and "Proxy-Connection: Keep-Alive" (however omitting them does not change anything).

* When connecting over another Proxy-Software (e.g. CCProxy) the problem does not occur, and the second request with the reused CURL-handle succeeds as expected and the NTLM-Challenge is not re-executed as it should be.
* When using no proxy server at all, the problem also does not occur.
* When not reusing the CURL-handle, also all works as expected, but the NTLM-Challenge needs to be re-executed for the second request which results in poor performance.

Can anybody help?


Received on 2017-08-11