cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_HTTP_VERSION doesn't work?

From: A. Craig West <acraigwest_at_gmail.com>
Date: Fri, 9 Jan 2009 19:32:58 -0500

2009/1/9 Dan Fandrich wrote:
>What happens if you patch libcurl (or do it from the app) to add a
>Content-Length: 0 header instead of changing the HTTP version number? That's
>one of the key differences between 1.0 and 1.1, namely that Content-Length:
>is optional in 1.1.
...
> Strange, since HTTP 1.1 mandates that it be included (at least for other than
> CONNECT requests). Hopefully, that's not the key issue that makes it work
> in your case.

I tried all of these changes, both separately and together, and none
of them fixed it (although I did have some hope for Content-Length)
On the other hand, I took a look at the NTLM header. In IE, it sets a
number of flags, specifically:
Negotiate 56, Negotiate 128, Negotiate 0x02000000, Negotiate NTLM2,
Negotiate Always Sign, Negotiate Workstation Supplied, Negotiate
Domain Supplied, Negotiate NTLM Key, Request Target, Negotiate OEM,
and Negotiate UNICODE. It also includes the Domain and Workstation
names.

Our request, on the other hand, only sets Negotiate NTLM, Negotiate
NTLM2, Request Target, Negotiate OEM, and Negotiate Always Sign.

As far as I can tell, this shouldn't be a reason to allow 1.1, but not
1.0, It is all very NTLM-specific. Looks like setting the protocol to
1.1 is the simplest solution, although it would be nice to know why
ISA thinks that makes it all better. Perhaps it is some sort of
compatibility mode?
-Craig
Received on 2009-01-10