Skip to content

Commit

Permalink
Merge pull request #105 from ryanhattam/master
Browse files Browse the repository at this point in the history
make compatible with rubyntlm 0.3
  • Loading branch information
rogerleite committed Dec 16, 2013
2 parents 6ca1151 + 54cb089 commit d80ece0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/httpi/adapter/net_http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,10 @@ def negotiate_ntlm_auth(http, &requester)

# we need to provide a domain in the packet if an only if it was provided by the user in the auth request
if @request.auth.ntlm[2]
message_builder[:domain] = Net::NTLM::EncodeUtil.encode_utf16le(@request.auth.ntlm[2].upcase)
message_builder[:domain] = @request.auth.ntlm[2].upcase
else
message_builder[:domain] = ''
end

# we should also provide the workstation name, currently the rubyntlm provider does not automatically
# set the workstation name
message_builder[:workstation] = Net::NTLM::EncodeUtil.encode_utf16le(Socket.gethostname)

ntlm_response = ntlm_message.response(message_builder ,
{:ntlmv2 => true})
Expand Down

0 comments on commit d80ece0

Please sign in to comment.