These are chat archives for IndySockets/Indy

8th
Jun 2017
mezen
@mezen
Jun 08 2017 08:28
Or, now tried this: First GET request is as shown above. If I get a 407 back I set hoInProcessAuth = True and BasicAuthentication = Falseand retry the GET request.
Wireshark now says Indy send 4 (MaxAuthRetries is still on default = 3) request instead of 1. Every request still has a basic proxy-authorization set.
mezen
@mezen
Jun 08 2017 08:44
Difference in calling of the Events after changing the options is: No OnStatus will be called, only OnHeadersAvailable , OnWorkBegin, OnWork and OnWorkEnd. Still no calls of OnProxyAuthorizationor OnSelectProxyAuthorization.
Remy Lebeau
@rlebeau
Jun 08 2017 16:27
@mezen TIdHTTP will not send a BASIC request unless BasicAuthentication=True, or the server actually requests Basic in WWW-Authenticate or Proxy-Authenticate, or you force Request.Authentication or ProxyParams.Authentication to TIdBasicAuthentication directly. When TIdHTTP receives 407, the only ways that OnSelectProxyAuthorization would not be triggered are either 1) AuthProxyRetries has exceeded MaxAuthRetries, or 2) ProxyParams.Authentication is already assigned an auth class. After an auth class has been assigned, the only ways that OnProxyAuthorization would not be triggered are either 1) ProxyParams.ProxyPassword is blank, or 2) the authentication class doesn't request user input (TIdAuthentication.Next() does not return wnAskTheProgram). You are going to have to step into Indy's souce code with the debugger to figure out what TIdHTTP is really doing during its 407 processing. TIdHTTP should be handling the retry requests for you. Make sure the credentials you are using are accurate. If they are not working, maybe the NTLM request is being malformed, so the proxy keeps rejecting it.