curl-library
2 NTLM patches
Date: Thu, 10 Jul 2003 10:53:02 -0400
(Both against the latest CVS code.)
Problem 1: NTLM doesn't work with the multi interface, because the
newurl field on the easy_conn never gets cleared, so it keeps resending
the request forever and ever. The attached patch to multi.c fixes that
(possibly incorrectly?).
Problem 2: Passing "" for the domain in the type 3 message won't work on
all servers for all users. (It only works if both the server has a
default domain set, and the user is a member of that domain.) The
attached patch to http_ntlm.c makes it parse usernames of the form
"foo\bar" (or "foo/bar") as domain="foo", username="bar". The reason I
did it that way is because IIS already parses usernames that way when
using Basic auth, so this means you can do
curl_easy_setopt (curl, CURLOPT_USERPWD, "domain\\user:password");
curl_easy_setopt (curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC | CURLAUTH_NTLM);
and it will do exactly the right thing. (Oh, Problem 2b: the
curl_easy_setopt man page lists the flags by the wrong names:
CURLHTTP_BASIC, etc rather than CURLAUTH_BASIC.)
-- Dan
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
- text/x-patch attachment: multi.c.diff__charset_ISO-8859-1
- text/x-patch attachment: http_ntlm.c.diff__charset_ISO-8859-1