var
Protocol, Host, Path, Document, Port, Bookmark : string;
BBSID, BBSKey : string;
+ foundPos : Integer;
begin
ParseURI( inURL, Protocol, Host, Path, Document, Port, Bookmark );
Parse2chURL( inURL, Path, Document, BBSID, BBSKey );
- Result := Protocol + '://' + Host + '/' + BBSID + '/';
+ foundPos := Pos( '/test/read.cgi', inURL );
+ if foundPos > 0 then
+ Result := Copy( inURL, 1, foundPos ) + BBSID + '/'
+ else
+ Result := Protocol + '://' + Host + '/' + BBSID + '/';
end;
Result := Protocol + '://' + Host +
READ_PATH + BBSID + '/' + BBSKey + '/l50';
end else begin
- Result := Protocol + '://' + Host +
- OLD_READ_PATH + 'bbs=' + BBSID + '&key=' + BBSKey + '&ls=50';
+ if foundPos > 0 then
+ Result := Copy( inURL, 1, foundPos ) +
+ OLD_READ_PATH + 'bbs=' + BBSID + '&key=' + BBSKey + '&ls=50'
+ else
+ Result := Protocol + '://' + Host +
+ OLD_READ_PATH + 'bbs=' + BBSID + '&key=' + BBSKey + '&ls=50';
end;
// end;