curl-users
RE: --ntlm and --fail (was user:password inside URL)
Date: Wed, 8 Oct 2003 22:51:58 +0200 (CEST)
On Mon, 6 Oct 2003, David Byron wrote:
> I tried moving to transfer.c (1.176) but got linker errors so I stuck with
> 1.173. If this is a problem, let me know what other stuff I need to get and
> I'll move forward. I was hoping to avoid getting everything new.
You should probably get everything new in a separate directory and work in
that. We've moved around and fiddled with the authentication code a lot since
7.10.7.
> This actually seems not so bad, although I don't know how it works with
> other authentication schemes. I'm pretty sure more code is needed to deal
> with them. Some of the code I wrote probably needs to be more general too.
Yes, your patch is a nice beginning but is a bit too focused on NTLM to a
host. It doesn't even do NTLM over a proxy properly with --fail, not to
mention Digest or Negotiate.
> The testsuite passes as far as it did before (but I haven't been running
> with server SSL). This does work for me in the two cases I tested:
>
> 1. http (not https) with --ntlm and --fail and the proper username and
> password
> 2. http (not https) with --ntlm and --fail and no username nor password
>
> The first case works just the same as if --fail wasn't used. The second
> case fails with error code 22. I looked for a more specific error code but
> couldn't find one. Seems like there should be one but I'll leave that
> decision for others/later.
22 is the code to return for this. Why isn't that specific enough?
> Please let me know what you think.
I think we need to work a bit harder on making this code more generic for all
authentication schemes. In the CVS code, we have a 'authdone' argument that is
set to TRUE when the "final" HTTP request is sent in lib/http.c. That
information could probably be put to use somehow.
-- Daniel Stenberg -- curl: been grokking URLs since 1998 ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.phpReceived on 2003-10-08