RTT wrote:
> Why this fix has not been added?
AFAIR Francois wasn't convinced, if there are no side effects and
Francois doesn't refuse it explicitly I'll add it.
--
Arno Garrels
> The first one is not really important, even if completes the logic
> already taken by the ParseURL for URLs missing the protocol , but the
> second change, used by the THttpCli when parsing redirection URLs, is
> IMO mandatory, because URLs beginning with '//' are valid relative
> URLs.
>
>> 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