Browse Source

* Correct PATH_INFO for IIS, patch by Marcos Douglas (bug ID 30073)

git-svn-id: trunk@33576 -
michael 9 years ago
parent
commit
5c2f941c32
1 changed files with 3 additions and 0 deletions
  1. 3 0
      packages/fcl-web/src/base/custcgi.pp

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

@@ -373,6 +373,9 @@ begin
         end;
         end;
       end;
       end;
     end;
     end;
+  // Microsoft-IIS hack. IIS includes the script name in the PATH_INFO
+  if Pos('IIS', ServerSoftware) > 0 then
+    SetHTTPVariable(hvPathInfo,StringReplace(PathInfo, ScriptName, '', [rfReplaceAll, rfIgnoreCase]));
   R:=UpCase(Method);
   R:=UpCase(Method);
   if (R='POST') or (R='PUT') or (ContentLength>0) then
   if (R='POST') or (R='PUT') or (ContentLength>0) then
     ReadContent;
     ReadContent;