cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: using NTLM proxy giving wrong content length for POST

From: Nick Fortescue <nick_at_ox.compsoc.net>
Date: Sat, 9 Jan 2010 10:03:22 +0000

2010/1/8 Daniel Stenberg <daniel_at_haxx.se>

> 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...

Sorry, I'm not an expert and don't understand how NTLM works, so I'm not why
your emphasis on _first_. However, this is my problem, maybe you can suggest
what I should do?

I want to simulate a browser submitting a form. I have to do this via a
proxy. The only way I have to authenticate against this particular proxy is
NTLM. This proxy requires authentication. A web browser can do this fine,
without losing the form arguments. Can this be done in curl? If so how?

Nick

-------------------------------------------------------------------
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-09