Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
httpi has 'rubyntlm', '~> 0.3.2' in its gem file, but there are two problems with using that version.
httpi is encoding the domain (using encode_utf16le) if a domain is passed into for ntlm authentication. When its passed to rubyntlm, it too encodes this parameter, using the same method. This double encoding does not work when passed in for authentication to a server, only the first letter is decoded. The username and password are not encoded by httpi which is correct. I simply stopped httpi from encoding the domain, as it doesn't need to.
httpi is attempting to pass in the 'workstation' by passing it in to the first parameter of rubyntlm's response method (arg), when its actually looking for it in the second parameter (opt). Luckily rubyntlm is also doing a workstation lookup, using the same Socket method, so the one in httpi is pointless. The comment in the httpi code indicates it was attempting to set it because rubyntlm wasn't doing it. Due to this comment, and it setting it in the wrong place it must have been referring to a previous version.
I believe this fixes the following issue: #102
Tests pass with this change.
Thanks