Browse Source

* Fixed TApacheRequest.RemoteHost property

git-svn-id: trunk@12880 -
joost 16 years ago
parent
commit
75815ee562
1 changed files with 4 additions and 3 deletions
  1. 4 3
      packages/fcl-web/src/fpapache.pp

+ 4 - 3
packages/fcl-web/src/fpapache.pp

@@ -521,9 +521,10 @@ begin
            If (FRequest^.Connection<>Nil) then
              Result:=StrPas(FRequest^.Connection^.remote_ip);
       28 : // RemoteHost
-           ap_get_remote_host(FRequest^.Connection,
-                              FRequest^.Per_Dir_Config,
-                              REMOTE_HOST,Nil);
+           If (FRequest^.Connection<>Nil) then
+             Result:=StrPas(ap_get_remote_host(FRequest^.Connection,
+                                FRequest^.Per_Dir_Config,
+                                REMOTE_HOST,Nil));
       29 : begin // ScriptName
            Result:=StrPas(FRequest^.unparsed_uri);
            I:=Pos('?',Result)-1;