Hi,

I'm on a Windows XP 64 bit machine running Visual Studio 2008 and I may be
doing something really stupid (probably), but I downloaded curl.exe (version
curl-7.21.0-win64-nossl) and running it with the following parameters from a
command line works fine:
curl --ntlm -u : http://sharepoint.domain.com/path/to/file.txt

However, I downloaded various versions of the library (curl-7.21.3 being the
most recent), but I cannot get it to successfully download the same file as
above - I constantly get 401.2 errors.
I've currently got the following options set, since I thought this would
match the command line and thus lead to happiness - but it doesn't, for me:

curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);

curl_easy_setopt(curl, CURLOPT_USERPWD, "domain/name:passwd");

curl_easy_setopt(curl, CURLOPT_VERBOSE, true);  //for debug

curl_easy_setopt(curl, CURLOPT_HEADER, true); //for debug

curl_easy_setopt(curl, CURLOPT_URL, "
http://sharepoint.domain.com/path/to/file.txt";);

Can someone please tell me how to replicate the above command line success
within a c-program using the libcurl? In case you couldn't tell, I'm new to
all this - so I may very well be making huge mistakes.

Many thanks for anyone's time,

Matt
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to