Skip to content

Commit

Permalink
Merge de6a843 into 6ca1151
Browse files Browse the repository at this point in the history
  • Loading branch information
tandrieu committed Nov 13, 2013
2 parents 6ca1151 + de6a843 commit a7268d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/httpi/adapter/net_http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ 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] = Net::NTLM::encode_utf16le(@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)
message_builder[:workstation] = Net::NTLM::encode_utf16le(Socket.gethostname)

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

0 comments on commit a7268d7

Please sign in to comment.