cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: testsuite failure -- test 91

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Fri, 9 Jan 2004 10:55:45 +0100 (CET)

On Fri, 9 Jan 2004, Marino, Marc wrote:

Thanks for your additional feedback on this issue. We need it!

> Just looking at an issue I'm having with curl that may be related.
>
> When setting CURLAUTH_ANY I receive various failures when downloading files
> from an NTLM authenticating host proxy. (Too many to list) Although if I
> select CURLAUTH_NTLM it works fine!

It certainly sounds highly related. What other authentications does it claim
to support?

> I have noticed that in the function http_auth_headers() the authentication
> comparison with variable ".authwant" is using equal operator '==' not
> bitwise AND operator '&'.

That is quite on purpose but we might need to clean up how this is done.

First we set 'authwant' to a bitmask to all auth types we can accept using.

If there's only one bit set, it will match the '==' checks and that particular
authentication will be used. If more than one bit is set, no '==' check
matches but curl will instead make a request to see what authentication types
the host/proxy offers. When it reads this response, it ORs the types into the
'authavail' variable.

Finally, it calls Curl_http_auth_act() and it picks one of the methods to use,
and sets 'authwant' to that single bit and "loops"...

> I have changed with comparison to '&' and it seems to work fine with both
> modes.

I think you effectively nullified the 'any' part by doing this.

> Just thought I might stir up some other thoughts..!

It did, but it doesn't explain why the test case 91 succeeds every now and
then!

-- 
    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.html
Received on 2004-01-09