Selaa lähdekoodia

* Do not decode Querystring yet. This is done when parsing it in name=value

git-svn-id: trunk@25081 -
michael 12 vuotta sitten
vanhempi
commit
e992431bc4
1 muutettua tiedostoa jossa 5 lisäystä ja 3 poistoa
  1. 5 3
      packages/fcl-web/src/base/custcgi.pp

+ 5 - 3
packages/fcl-web/src/base/custcgi.pp

@@ -324,10 +324,12 @@ end;
 
 
 Function TCGIRequest.GetFieldValue(Index : Integer) : String;
 Function TCGIRequest.GetFieldValue(Index : Integer) : String;
 
 
-  Function DecodeVar(I : Integer) : String;
+  Function DecodeVar(I : Integer; DoDecode : Boolean = true) : String;
   
   
   begin
   begin
-    Result:=HTTPDecode(GetEnvironmentVariable(CGIVarNames[I]));
+    Result:=GetEnvironmentVariable(CGIVarNames[I]);
+    if DoDecode then
+      Result:=HttpDecode(Result)
   end;
   end;
 
 
 begin
 begin
@@ -342,7 +344,7 @@ begin
     30 : Result:=DecodeVar(15); // Property ServerPort
     30 : Result:=DecodeVar(15); // Property ServerPort
     31 : Result:=DecodeVar(12); // Property RequestMethod
     31 : Result:=DecodeVar(12); // Property RequestMethod
     32 : Result:=DecodeVar(34); // Property URI
     32 : Result:=DecodeVar(34); // Property URI
-    33 : Result:=DecodeVar(7); // Property QueryString
+    33 : Result:=DecodeVar(7,False); // Property QueryString
     36 : Result:=DecodeVar(36); // Property XRequestedWith
     36 : Result:=DecodeVar(36); // Property XRequestedWith
   else
   else
     Result:=Inherited GetFieldValue(Index);
     Result:=Inherited GetFieldValue(Index);