Fix NTLM Proxy authentication issues. #387
Open
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.
I found two issues when authenticating against NTLM Proxy on Mac OSX. I am testing AsiHttpRequest with Microsoft Forefront TMG server as the proxy.
Issue 1) Http request's user credential is used for proxy credential.
For most use cases, user will have proxy credential stored in the keychain.
Look for credential in keychain first, then use the http request credential.
Issue 2) From wireshark network traces, calling startRequest twice does not
actually send the NTLM proxy auth challenge response. The third startRequest
will send the auth challenge response and get past the proxy authentication.
There must be a different root cause for not responding for the NTLM auth challenge with the original code. By making the 3rd startRequest call, I can workaround this issue, however.