This kind of change would be interesting if implemented in a way that a
derived class can implement his own parser. The base class in ICS would then
parse the URL as currently and the developer would be able to create a
derived class (component) which override the standard behaviour with
whatever is required by his specific context.
[email protected]
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be
-----Message d'origine-----
From: RTT
Sent: Friday, October 28, 2011 12:12 AM
To: ICS support mailing
Subject: Re: [twsocket] THTTPCli fail to resolve URLs that start with "//"
On 27-10-2011 18:33, Arno Garrels wrote:
I'd be happy to see more contributions from the ICS users in general.
1st change
------------------------------------------------------------------------
In unit OverbyteIcsUrl, procedure ParseURL(..., replace
if (url[1] = '/') then begin
{ Relative path without protocol specified }
proto := 'http';
p := 1;
if (Length(url) > 1) and (url[2] <> '/') then begin
{ Relative path }
Path := Copy(url, 1, Length(url));
Exit;
end;
end
by
if (url[1] = '/') then begin
{ Relative path without protocol specified }
proto := 'http';
if (Length(url) > 1) then begin
if (url[2] <> '/') then begin
{ Relative path }
Path := Copy(url, 1, Length(url));
Exit;
end else
p:=2;
end
else begin
Path := '/';
Exit;
end;
end
2nd Change
------------------------------------------------------------------------
In unit OverbyteIcsHttpProt, procedure THttpCli.GetHeaderLineNext, replace
if Field = 'location' then begin { Change the URL ! }
by
if Field = 'location' then begin { Change the URL ! }
if Copy(Data,1,2)='//' then
Data:=FProtocol+':'+Data;
--
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
--
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