Scrive Arno Garrels <[EMAIL PROTECTED]>:

> Maurizio Lotauro wrote:


> > Unfortunately I'm still using an old version of HttpProt.pas (1.86),
> > and it seems different from yours, at least in the StateChange
> > procedure. Can you send your HttpProt.pas?
> It's from Icsv7 but the snippets should match v6 as well.

Oh, and there are some work made by me that I never added to my version!
Well, there is a reason. I use a completely different approach to handle the
authentication and I never need to use the ContentCodig.


I tried to follow a different way for this "fix".
Our problem is that the response of the server become before the client has
completed to send the request. Actually the component consider the end of the
response body (or header if there is no body) as end of operation. This happen
setting the httpReady state.
So instead of delaying the re-send I delay the set of the state to httpReady.
When the state change to httpReady the request is sent and the response is
received. I we reproduce this then the rest works as usual.

I added a new internal variable FDelaySetReady (boolean) as flag that the
SetReady must be called when the whole SendStream is sent.
Some places changed so:

=>            else if ((FStatusCode = 401) or (FStatusCode = 407)) and
=>                    FAllowedToSend then
=>                FDelaySetReady := TRUE

The SocketDataSent changed so:

    if Len <= 0 then begin
        FAllowedToSend := FALSE;
=>        if FDelaySetReady then begin
=>          FDelaySetReady := FALSE;
=>          SetReady;
=>        end;

It seems quite easy and without drawback because reproduce the "normal" flow.
What do you think?

Arno, I'll try to add these changes to the version you send me so you can give
it a try.

Bye, Maurizio.

This mail has been sent using Alpikom webmail system

To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to