|
@@ -207,7 +207,7 @@ begin
|
|
|
Result.Bookmark := Copy(s, i + 1, MaxInt);
|
|
|
if Decode then
|
|
|
Result.Bookmark:=Unescape(Result.Bookmark);
|
|
|
- s := Copy(s, 1, i - 1);
|
|
|
+ SetLength(s, i - 1);
|
|
|
end;
|
|
|
|
|
|
// Extract the params
|
|
@@ -218,7 +218,7 @@ begin
|
|
|
Result.Params := Copy(s, i + 1, MaxInt);
|
|
|
if Decode then
|
|
|
Result.Params:=Unescape(Result.Params);
|
|
|
- s := Copy(s, 1, i - 1);
|
|
|
+ SetLength(s, i - 1);
|
|
|
end;
|
|
|
|
|
|
// extract authority
|
|
@@ -248,7 +248,7 @@ begin
|
|
|
if Decode then
|
|
|
Result.Document:=Unescape(Result.Document);
|
|
|
if (Result.Document <> '.') and (Result.Document <> '..') then
|
|
|
- s := Copy(s, 1, i)
|
|
|
+ SetLength(s, i)
|
|
|
else
|
|
|
Result.Document := '';
|
|
|
break;
|
|
@@ -287,7 +287,7 @@ begin
|
|
|
if PortValid then
|
|
|
begin
|
|
|
Result.Port := StrToInt(Copy(Authority, i + 1, MaxInt));
|
|
|
- Authority := Copy(Authority, 1, i - 1);
|
|
|
+ SetLength(Authority, i - 1);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
@@ -296,11 +296,11 @@ begin
|
|
|
i := Pos('@', Authority);
|
|
|
if i > 0 then
|
|
|
begin
|
|
|
- Result.Host := Copy(Authority, i+1, MaxInt);
|
|
|
- Delete(Authority, i, MaxInt);
|
|
|
+ Result.Host := Copy(Authority, i + 1, MaxInt);
|
|
|
+ SetLength(Authority, i - 1);
|
|
|
|
|
|
// Extract username and password
|
|
|
- if Length(Authority) > 0 then
|
|
|
+ if Authority <> '' then
|
|
|
begin
|
|
|
i := Pos(':', Authority);
|
|
|
if i = 0 then
|