mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 14:49:10 +02:00
* Clear request/response variables in case of an error
git-svn-id: trunk@25179 -
This commit is contained in:
parent
5459dc4401
commit
db0585f388
@ -219,10 +219,13 @@ procedure TFPHTTPServerHandler.HTTPHandleRequest(Sender: TObject;
|
|||||||
var AResponse: TFPHTTPConnectionResponse);
|
var AResponse: TFPHTTPConnectionResponse);
|
||||||
begin
|
begin
|
||||||
// Exceptions are handled by (Do)HandleRequest. It also frees the response/request
|
// Exceptions are handled by (Do)HandleRequest. It also frees the response/request
|
||||||
DoHandleRequest(ARequest,AResponse);
|
try
|
||||||
ARequest:=Nil;
|
DoHandleRequest(ARequest,AResponse);
|
||||||
AResponse:=Nil;
|
finally
|
||||||
If Terminated then
|
ARequest:=Nil;
|
||||||
|
AResponse:=Nil;
|
||||||
|
end;
|
||||||
|
If Terminated And Assigned(FServer) then
|
||||||
FServer.Active:=False;
|
FServer.Active:=False;
|
||||||
if Assigned(OnIdle) then
|
if Assigned(OnIdle) then
|
||||||
OnIdle(Self);
|
OnIdle(Self);
|
||||||
|
Loading…
Reference in New Issue
Block a user