fcl-web: fixed av on logging TFPHTTPConnection.DoHandleRequest

This commit is contained in:
mattias 2023-04-03 11:46:26 +02:00
parent 8bb8e5716e
commit c0f9878e2f
5 changed files with 12 additions and 3 deletions

Binary file not shown.

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<Compiler Value="/usr/lib/fpc/3.3.1/ppcx64" Date="1680458816"/>
<Params Value=" -MObjFPC -Scghi -Cg -O1 -g -gl -l -vewnhibq -Fu/home/mattias/pascal/fpc_sources/3.3.1/packages/fcl-web/examples/echo/webmodule -Fu/home/mattias/pascal/fpc_sources/3.3.1/packages/fcl-web/examples/httpserver/ -o/home/mattias/pascal/fpc_sources/3.3.1/packages/fcl-web/examples/httpserver/simplehttpserver simplehttpserver.pas"/>
</CONFIG>

View File

@ -7,6 +7,7 @@
<SaveOnlyProjectUnits Value="True"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
<MainUnitHasScaledStatement Value="False"/>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>

View File

@ -11,8 +11,6 @@ uses
Type
{ TTestHTTPServer }
{ THTTPServer }
THTTPServer = Class(TTestHTTPServer)

View File

@ -1247,7 +1247,12 @@ begin
if Assigned(Resp) and (not Resp.ContentSent) then
Resp.SendContent;
If Assigned(Server) and Server.CanLog(hlmRequestDone) then
Server.DoLog(hlmRequestDone,SRequestDone,[Resp.ToString]);
begin
if Assigned(Resp) then
Server.DoLog(hlmRequestDone,SRequestDone,[Resp.ToString])
else
Server.DoLog(hlmRequestDone,SRequestDone,['Response was freed']);
end;
Finally
FreeAndNil(Resp);
FreeAndNil(Req);