Browse Source

+ Fixed parsing of URIs without paths.

michael 22 years ago
parent
commit
0067cfc9a6
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/base/netdb/uriparser.pp

+ 3 - 1
packages/base/netdb/uriparser.pp

@@ -198,7 +198,9 @@ begin
     else if s[i] in [':', '@'] then
     else if s[i] in [':', '@'] then
       break;
       break;
 
 
-  if LastValidPos > 0 then
+  if (LastValidPos > 0) and 
+     (Length(S)>LastValidPos) and 
+     (S[LastValidPos+1]<>'/') then
   begin
   begin
     Result.Path := Unescape(Copy(s, LastValidPos, Length(s)));
     Result.Path := Unescape(Copy(s, LastValidPos, Length(s)));
     s := Copy(s, 1, LastValidPos - 1);
     s := Copy(s, 1, LastValidPos - 1);