------ art_3322_12227814.1196514138125 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Dec 1, 2007 4:08 AM, Jim Clark <diegoslice / gmail.com> wrote: > > When I look at resp.content in my debugger, I see that the @header_item > array has the normal info (content type, content length, server, etc.) > and also has ["WWW-Authenticate", "Negotiate"] and the second > ["WWW-Authenticate", "NTLM"]. When I trace through the get method, I see > that @negotiate_auth has a hash @auth which {} and @auth_default > which null. I guess if I can figure out how to populate these > correctly then I'm probably good to go. > Keep in mind that NTLM requires at least two round trips to the server in each connection. Your first GET/POST/whatever request needs to have an NTLM "type 1" message in the Authorize header. The server will then respond with a 401, but the response will contain an NTLM "type 2" message that you use to create an NTLM "type 3" response. You then send your GET/POST again, with the type 3 response in the Authorize header. At that point, if all goes well, you get a 2xx from the server. Your best bet is to use rubyntlm as a previous commenter suggested. ------ art_3322_12227814.1196514138125--