curl-library
Re: Debugging tip for HTTPAUTH problem?
Date: Wed, 14 Jan 2004 08:17:30 +0100 (CET)
On Tue, 13 Jan 2004, mitz wark wrote:
> I hope this is not a too trivial question, but I am trying to make 'digest'
> authentication work by using these relatively new curl opt.
>
> curl_easy_setopt(mCurlHandle, CURLOPT_USERPWD, user_pass.c_str());
> curl_easy_setopt(mCurlHandle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
>
> But appearantly, server is returning, HTTP401 to me, and always fails in this block in 'transfer.c'.
> if (data->set.http_fail_on_error && (k->httpcode >= 400))
> { ........ ..... ....
> return CURLE_HTTP_RETURNED_ERROR
> }
You're experiencing a bug: CURLOPT_FAILONERROR doesn't work with a non-Basic
authentication! This is in fact mentioned in the KNOWN_BUGS document.
Fixing this flaw is not trivial, and this bug is still present in the current
development version.
The work-around is simply to not use CURLOPT_FAILONERROR for these cases.
-- Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/ [[ Do not send mails to this email address. They won't reach me. ]] ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.htmlReceived on 2004-01-14