cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: using NTLM proxy giving wrong content length for POST

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 8 Jan 2010 23:28:18 +0100 (CET)

On Fri, 8 Jan 2010, Nick Fortescue wrote:

> When I try and do a POST (with -d) through an NTLM authenticating proxy, the
> content length gets set to 0 and the form arguments are not sent.

Right, it doesn't send any arguments in the _first_ request but the first
request won't be accepted anyway since it isn't authenticated so the server
would discard the data anyway.

So this isn't really a bug but by design.

I know this causes problems at times, but there really isn't any really good
solutions to this. I would really really not like to unconditionally send the
entire contents in the first post as well since if you make a big POST over
NTLM that is potentially a very big loss.

Doesn't --proxy-anyauth work better for you to let curl pick the auth by
itself after probing the server? As then curl will first try unauthenticated
which _will_ send the data in the first request...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-01-08