From e992431bc4af2c265d4a6f39f0e7465ecd12fdd8 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 10 Jul 2013 13:29:46 +0000 Subject: [PATCH] * Do not decode Querystring yet. This is done when parsing it in name=value git-svn-id: trunk@25081 - --- packages/fcl-web/src/base/custcgi.pp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/fcl-web/src/base/custcgi.pp b/packages/fcl-web/src/base/custcgi.pp index e50426dcc2..c926183900 100644 --- a/packages/fcl-web/src/base/custcgi.pp +++ b/packages/fcl-web/src/base/custcgi.pp @@ -324,10 +324,12 @@ end; Function TCGIRequest.GetFieldValue(Index : Integer) : String; - Function DecodeVar(I : Integer) : String; + Function DecodeVar(I : Integer; DoDecode : Boolean = true) : String; begin - Result:=HTTPDecode(GetEnvironmentVariable(CGIVarNames[I])); + Result:=GetEnvironmentVariable(CGIVarNames[I]); + if DoDecode then + Result:=HttpDecode(Result) end; begin @@ -342,7 +344,7 @@ begin 30 : Result:=DecodeVar(15); // Property ServerPort 31 : Result:=DecodeVar(12); // Property RequestMethod 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 else Result:=Inherited GetFieldValue(Index);