Maurizio Lotauro wrote: > This will work with Basic bu not with NTLM because (IIRC) the > authentication phase is started by the server with the first 401.
Looks like sending body data must be delayed somehow, realy not nice! Maybe OnSendBegin is the right place: THttpCli.SocketSessionConnected() .. SendRequest('POST', FRequestVer); .. TriggerSendBegin; if TriggerSendBeginEx then begin // New, same for PUT etc. returns TRUE by default FAllowedToSend := TRUE; SocketDataSent(FCtrlSocket, 0); end; .. New event: TOnSendBeginExEvent = procedure (Sender : TObject; var AllowSend: Boolean) of object; In the event handler some wait loop (arrrgh!) that checks for state httpReady or timeout. > Is there a way to empty the socket buffer? Yes, CtrlSocket.DeleteBufferedData, but that will most likely come far too late, not reliable as well. -- Arno -- 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