mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 12:09:30 +02:00
Fix TFPHTTPConnectionThread.Execute repeat loop
This commit is contained in:
parent
8fc1bc276f
commit
410916ab6b
@ -85,14 +85,8 @@ Type
|
|||||||
Property Server : TFPCustomHTTPServer Read FServer;
|
Property Server : TFPCustomHTTPServer Read FServer;
|
||||||
Property OnRequestError : TRequestErrorHandler Read FOnError Write FOnError;
|
Property OnRequestError : TRequestErrorHandler Read FOnError Write FOnError;
|
||||||
Property LookupHostNames : Boolean Read GetLookupHostNames;
|
Property LookupHostNames : Boolean Read GetLookupHostNames;
|
||||||
<<<<<<< HEAD
|
|
||||||
Property EnableKeepAlive: Boolean read FEnableKeepAlive write FEnableKeepAlive;
|
|
||||||
Property KeepAliveEnabled: Boolean read FKeepAliveEnabled write FKeepAliveEnabled;
|
|
||||||
=======
|
|
||||||
|
|
||||||
// Set to true if you want to support HTTP 1.1 connection: keep-alive - only available for threaded server
|
// Set to true if you want to support HTTP 1.1 connection: keep-alive - only available for threaded server
|
||||||
Property EnableKeepAlive: Boolean read FEnableKeepAlive write FEnableKeepAlive;
|
Property EnableKeepAlive: Boolean read FEnableKeepAlive write FEnableKeepAlive;
|
||||||
>>>>>>> Remove the KeepAlive* properties from TFPCustomHttpServer, rename KeepAliveEnabled to EnableKeepAlive
|
|
||||||
// time-out for keep-alive: how many ms should the server keep the connection alive after a request has been handled
|
// time-out for keep-alive: how many ms should the server keep the connection alive after a request has been handled
|
||||||
Property KeepAliveTimeout: Integer read FKeepAliveTimeout write FKeepAliveTimeout;
|
Property KeepAliveTimeout: Integer read FKeepAliveTimeout write FKeepAliveTimeout;
|
||||||
// is the current connection set up for KeepAlive?
|
// is the current connection set up for KeepAlive?
|
||||||
@ -235,13 +229,10 @@ Type
|
|||||||
Property OnGetSocketHandler : TGetSocketHandlerEvent Read FOnGetSocketHandler Write FOnGetSocketHandler;
|
Property OnGetSocketHandler : TGetSocketHandlerEvent Read FOnGetSocketHandler Write FOnGetSocketHandler;
|
||||||
// Called after create socket handler was created, with the created socket handler.
|
// Called after create socket handler was created, with the created socket handler.
|
||||||
Property AfterSocketHandlerCreate : TSocketHandlerCreatedEvent Read FAfterSocketHandlerCreated Write FAfterSocketHandlerCreated;
|
Property AfterSocketHandlerCreate : TSocketHandlerCreatedEvent Read FAfterSocketHandlerCreated Write FAfterSocketHandlerCreated;
|
||||||
<<<<<<< HEAD
|
|
||||||
// Set to true if you want to support HTTP 1.1 connection: keep-alive - only available for threaded server
|
// Set to true if you want to support HTTP 1.1 connection: keep-alive - only available for threaded server
|
||||||
Property KeepAliveEnabled: Boolean read FKeepAliveEnabled write FKeepAliveEnabled;
|
Property KeepAliveEnabled: Boolean read FKeepAliveEnabled write FKeepAliveEnabled;
|
||||||
// time-out for keep-alive: how many ms should the server keep the connection alive after a request has been handled
|
// time-out for keep-alive: how many ms should the server keep the connection alive after a request has been handled
|
||||||
Property KeepAliveTimeout: Integer read FKeepAliveTimeout write FKeepAliveTimeout;
|
Property KeepAliveTimeout: Integer read FKeepAliveTimeout write FKeepAliveTimeout;
|
||||||
=======
|
|
||||||
>>>>>>> Remove the KeepAlive* properties from TFPCustomHttpServer, rename KeepAliveEnabled to EnableKeepAlive
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TFPHttpServer = Class(TFPCustomHttpServer)
|
TFPHttpServer = Class(TFPCustomHttpServer)
|
||||||
@ -660,7 +651,7 @@ begin
|
|||||||
and not Connection.Socket.CanRead(Connection.KeepAliveTimeout) then
|
and not Connection.Socket.CanRead(Connection.KeepAliveTimeout) then
|
||||||
break;
|
break;
|
||||||
FConnection.HandleRequest;
|
FConnection.HandleRequest;
|
||||||
until not (Terminated and FConnection.EnableKeepAlive and FConnection.KeepAlive and (FConnection.Socket.LastError=0));
|
until not (not Terminated and FConnection.EnableKeepAlive and FConnection.KeepAlive and (FConnection.Socket.LastError=0));
|
||||||
finally
|
finally
|
||||||
FreeAndNil(FConnection);
|
FreeAndNil(FConnection);
|
||||||
if Assigned(FThreadList) then
|
if Assigned(FThreadList) then
|
||||||
|
Loading…
Reference in New Issue
Block a user