Francois PIETTE wrote: >> A 401 is returned. >> >> What am I missing? > > As I told you in my previous message, you missed that password > (passed as var to the event handler) is initialized to #0 which is > NOT an empty string.
I also do not understand why that has something to do with the fact that both THttpCli and THttpServer require a non-empty password string to handle authentication, one snipped from THttpCli: {code} if (FStatusCode = 401) and (FDoAuthor.Count > 0) and {$IFDEF UseNTLMAuthentication} (FAuthNTLMState = ntlmNone) and {$ENDIF} {$IFDEF UseDigestAuthentication} (FAuthDigestState = digestNone) and {$ENDIF} (FCurrUserName <> '') and (FCurrPassword <> '') then begin { We can handle authorization } {code} I think that is a bug, though empty passwords are rarely used. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be