Fix digest credentials for proxy in windows#4104
Conversation
| if (t->owner->proxy.credentials) { | ||
| int cred_error = 1; | ||
| cred_error = t->owner->proxy.credentials(&t->proxy_cred, t->owner->proxy.url, NULL, allowed_types, NULL); | ||
| cred_error = t->owner->proxy.credentials(&t->proxy_cred, t->owner->proxy.url, NULL, allowed_types, t->owner->proxy.payload); |
There was a problem hiding this comment.
I don't quite understand where this change is coming from yet. I don't immediately see anything that's using a payload with regards to the digest changes... Is this a related change, or should it be split out into its own commit?
There was a problem hiding this comment.
Without the payload, the credentials call was segfaulting in https://github.com/nodegit/nodegit. It isn't directly related to digest credentials, but without it, the credentials callback isn't working. I'll go ahead and split it into its own commit.
There was a problem hiding this comment.
@ethomson Alright, that's taken care of. Let me know if there's anything else that needs changing. Thanks!
There was a problem hiding this comment.
Got it. Thanks for clarifying; I do appreciate that you split this out into its own commit.
c7e667f to
1e929eb
Compare
Using a proxy with digest credentials was not working in Windows. It was simply always using basic auth whenever a plaintext credential mechanism was specified. Detecting whether the plaintext credential mechanism was digest or basic and applying that mechanism to
WinHttpSetCredentialsfixed the problem.