my 2 cents on this : If you feed Thttpcli.url with a invalid url no urldecode is executed. To keep consistency in behavior I would not just do an automatic urldecode on a relocate.
The main issue is however that with the followrelocate set it will generate an error while a browser will not. To allow a programmer to make a decision on an invalid relocate url the component must provide an option to do so. I therefore see 3 possible solutions. 1) A new property AutoDecodeRelocationUrl type Boolean. Default FALSE. If set TRUE will execute a urldecode on the relocate AND possible on the httpcli.url also. But if it include the later option as well the name maybe should be AutoUrlDecode. 2) A new event OnRelocationRecieved(data : String; Accept : Boolean) to be called around line 2675 (procedure getheaderlinenext) ---------------------------------- { co=32&js=1.4&sr=1024x768&re=http://www.thesite.com/you.html } FLocationFlag := TRUE; if Proxy <> '' then begin ---------------------------------- something like ---------------------------------- { co=32&js=1.4&sr=1024x768&re=http://www.thesite.com/you.html } baccept := true; if Assigned(FOnRelocationRecieved) then FOnRelocationRecieved(data,baccept); If baccept then FLocationFlag := TRUE; if Proxy <> '' then begin ---------------------------------- This would allow the programmer to temporary overrule the FFollowRelocation setting on demand but also allow adjustment of the received header data. I think that would enhance flexibility. 3) A change to the procedure getheaderlinenext to just change the received data. In my opion not the best option as it can cause confusion about what is really received. Feedback appreciated :>> -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be