Browse Source

* Fix query var setting (bug ID 27915)

git-svn-id: trunk@30689 -
michael 10 years ago
parent
commit
ea9fc6581a
1 changed files with 4 additions and 2 deletions
  1. 4 2
      packages/fcl-web/src/base/fphttpserver.pp

+ 4 - 2
packages/fcl-web/src/base/fphttpserver.pp

@@ -274,10 +274,12 @@ end;
 procedure TFPHTTPConnectionRequest.InitRequestVars;
 Var
   P : Integer;
+  S : String;
 begin
-  P:=Pos('?',URI);
+  S:=URL;
+  P:=Pos('?',S);
   if (P<>0) then
-    SetHTTPVariable(hvQuery,Copy(URI,P+1,Length(URI)-P));
+    SetHTTPVariable(hvQuery,Copy(S,P+1,Length(S)-P));
   if Assigned(FConnection) and FConnection.LookupHostNames then
     SetHTTPVariable(hvRemoteHost,GetHostNameByAddress(RemoteAddress));
   inherited InitRequestVars;