cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How-To use NTLM proxy authentication?

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 28 Mar 2005 22:43:00 +0200 (CEST)

On Sun, 27 Mar 2005, Augustus Saunders wrote:

> Ok, as a reminder on the background here, there are 2 problems: 1) using
> curl_easy_setopt(blah, CURLPROXY_AUTH, CURLAUTH_ANY) doesn't work; no
> Proxy-Authentication headers ever get sent.

Is this true even for other kinds of auths used by the proxy?

> 2) if CURLPROXY_AUTH gets set to NTLM and you do an HTTP POST, libcurl goes
> into an infinite loop while negotiating the NTLM auth.

I'm now working on setting up a test case for this, to be able to repeat it
myself. I'll get back with reports on this when I've reached somewhere.

> Incidently, is there a way to get libcurl to abort an operation when it gets
> an error back?

Error back from where?

> I tried FAILONERROR, but it doesn't seem to do what I want. I'm POSTing
> pretty large files and I don't want to continue uploading once I know it's
> gonna fail.

Then in what way doesn't FAILONERROR do what you want? And if not, isn't
returning an error from a header callback good enough to add a "custom" abort?

> PS Regarding test cases, I'm not sure what framework you've got set up

Check out the tests/ directory for the lot. The downside for you (judging
from your mentioning of .exe) is probably that it doesn't work on Windows...

> but as far as I can tell, curl.exe has no command line switch to enably
> CURLAUTH_ANY for proxies.

True, but it would be easily added.

> And posting form data from the command line seems like a PITA (though I
> haven't tried, admittedly).

It isn't. There are numerous test cases doing that already.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-03-28