Arno Garrels wrote:
> Arno Garrels wrote:
>> Frans van Daalen wrote:
>>>>> Update : Seems there are still scenario's where the problem
>>>>> returns also sometimes the proxy settings are lost creating a 407
>>>>> when a relocation happens. Seems to happen when executing a
>>>>> GetAsync and a relocate is triggered (with follow relocation set)
>>>> Thanks for the report. That's probably because SetReady is skipped
>>>> with it's code related to proxy and www-authentication :(
>>>> The HTTP component is a TRUE beast.
>>> Yes, it is! Is there not something like a full-blown http test tool
>>> which we can run against it and then start rewriting some parts to
>>> get it back in it's cage ? I found several on the web but have no
>>> idea if it has ever been used for THttpcli
>>> Can you locate that setready skipping somewhere?
>> My suggested fix did skip SetReady when FLocationFlag was set, it has
>> to be removed. I have a new idea:
>> in procedure THttpCli.StateChange(NewState : THttpState);
>> try call TriggerRequestDone only when FLocationFlag is not set.
>> However that might also lead to other side-effects I'm currently not
>> aware of, it worked with and without proxy connection in a brief
>> test. 
> That works for me as long as the proxy connection keeps alive after a
> 301/302. Otherwise it helps to clear the AuthStates in procedure
> THttpCli.LocationSessionClosed.
> {$IFDEF UseNTLMAuthentication}
>    FAuthNTLMState        := ntlmNone;
>    FProxyAuthNTLMState   := ntlmNone;
> {$ENDIF}
> {$IFDEF UseDigestAuthentication}
>    FAuthDigestState      := digestNone;
>    FProxyAuthDigestState := digestNone;
> {$ENDIF}
>    FAuthBasicState       := BasicNone;
>    FProxyAuthBasicState  := BasicNone;

That's not all, I found and fixed some more problems so far.
I just checked in Rev. #670 into SVN, please test the fix
and report back as soon as possible, thanks for your help.

Proxy authentication with relocations (hopefully) fixed. SSL not tested yet. 
If it still doesn't work it's probably a buggy proxy server i.e. 3Proxy.
Parse NTLM user codes into domain and user name parts and pass them to 
NtlmGetMessage3 in method GetNTLMMessage3.

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

Reply via email to