httpserver keep-alive first attempt

This commit is contained in:
Ondrej Pokorny 2021-08-14 02:12:40 +02:00 committed by Michaël Van Canneyt
parent c68c22e9e8
commit 9d9128a747
2 changed files with 1 additions and 7 deletions
packages
fcl-net/src
fcl-web/src/base

View File

@ -491,16 +491,11 @@ var
B: Byte;
lTM: Integer;
begin
// ToDo: support properly with the socket select() function
// currently a workaround
lTM := IOTimeout;
IOTimeout := TimeOut;
FHandler.Recv(B,0);
Result := FHandler.FLastError=0;
try
IOTimeout := lTM;
except
end;
IOTimeout := lTM;
end;
Function TSocketStream.Read (Var Buffer; Count : Longint) : longint;

View File

@ -85,7 +85,6 @@ Type
Property Server : TFPCustomHTTPServer Read FServer;
Property OnRequestError : TRequestErrorHandler Read FOnError Write FOnError;
Property LookupHostNames : Boolean Read GetLookupHostNames;
// 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;
// time-out for keep-alive: how many ms should the server keep the connection alive after a request has been handled