* Clear request/response variables in case of an error

git-svn-id: trunk@25179 -
This commit is contained in:
michael 2013-07-29 08:16:59 +00:00
parent 5459dc4401
commit db0585f388

View File

@ -219,10 +219,13 @@ procedure TFPHTTPServerHandler.HTTPHandleRequest(Sender: TObject;
var AResponse: TFPHTTPConnectionResponse);
begin
// Exceptions are handled by (Do)HandleRequest. It also frees the response/request
DoHandleRequest(ARequest,AResponse);
ARequest:=Nil;
AResponse:=Nil;
If Terminated then
try
DoHandleRequest(ARequest,AResponse);
finally
ARequest:=Nil;
AResponse:=Nil;
end;
If Terminated And Assigned(FServer) then
FServer.Active:=False;
if Assigned(OnIdle) then
OnIdle(Self);