cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: POST file twice over NTLM-proxy

From: Andrew Klukvin <andrew_at_icon3.ru>
Date: Tue, 09 Jan 2007 12:54:13 +0300

Daniel Stenberg ?????:
> On Tue, 9 Jan 2007, Andrew Klukvin wrote:
>
>> I'm using curl_formadd and POST-method to send file via proxy with
>> NTLM-auth. Looking on ProgressFunction, I see that my file send twice
>> (probably because of NTLM-specific). Am I right or not?
>
> You are right. There's no way to avoid that when using NTLM, since we
> can't abort the transfer once it has started.
>
>> P.S. Previously I use my own library where I try to authorize using
>> HEAD-method (I ask for new login every time when error 407 occured)
>> and then send data with POST-method. May be this is preferred
>> algorithm but I want using libcurl in my project. And may be I need
>> to use curl in the same way?
>
> You could indeed use that method with libcurl too, and it sounds like
> a smart way to avoid the extra round-trip. libcurl used to do that
> HEAD-trick by itself in the past, but since it isn't the correct way
> in all situations we had to change libcurl to work as it does and
> leave the imaginativework-arounds (with HEAD or otherwise) to the app.
>
> Do note that there's nothing in general that guarantees that HEAD will
> work on the same URL as you POST to... (or even that it would use the
> same auth).
>
Thank You for answer! I hope that my name appears in developer list.
That's a joke :)
Received on 2007-01-09