|
@@ -87,6 +87,15 @@ uses
|
|
{$endif}
|
|
{$endif}
|
|
Sockets;
|
|
Sockets;
|
|
|
|
|
|
|
|
+{$undef nosignal}
|
|
|
|
+
|
|
|
|
+{$if defined(FreeBSD) or defined(Linux)}
|
|
|
|
+ {$define nosignal}
|
|
|
|
+{$ifend}
|
|
|
|
+
|
|
|
|
+Const
|
|
|
|
+ NoSignalAttr = {$ifdef nosignal} MSG_NOSIGNAL{$else}0{$endif};
|
|
|
|
+
|
|
{ TFCGIHTTPRequest }
|
|
{ TFCGIHTTPRequest }
|
|
|
|
|
|
procedure TFCGIRequest.ReadContent;
|
|
procedure TFCGIRequest.ReadContent;
|
|
@@ -243,7 +252,7 @@ var BytesToWrite : word;
|
|
BytesWritten : Integer;
|
|
BytesWritten : Integer;
|
|
begin
|
|
begin
|
|
BytesToWrite := BEtoN(ARecord^.contentLength) + ARecord^.paddingLength+sizeof(FCGI_Header);
|
|
BytesToWrite := BEtoN(ARecord^.contentLength) + ARecord^.paddingLength+sizeof(FCGI_Header);
|
|
- BytesWritten := sockets.fpsend(TFCGIRequest(Request).Handle, ARecord, BytesToWrite, {$ifdef unix} MSG_NOSIGNAL{$else}0{$endif});
|
|
|
|
|
|
+ BytesWritten := sockets.fpsend(TFCGIRequest(Request).Handle, ARecord, BytesToWrite, NoSignalAttr);
|
|
Assert(BytesWritten=BytesToWrite);
|
|
Assert(BytesWritten=BytesToWrite);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -359,7 +368,7 @@ var Header : FCGI_Header;
|
|
result := False;
|
|
result := False;
|
|
if ByteAmount>0 then
|
|
if ByteAmount>0 then
|
|
begin
|
|
begin
|
|
- BytesRead := sockets.fpRecv(FHandle, ReadBuf, ByteAmount, {$ifdef unix} MSG_NOSIGNAL{$else}0{$endif});
|
|
|
|
|
|
+ BytesRead := sockets.fpRecv(FHandle, ReadBuf, ByteAmount, NoSignalAttr);
|
|
if BytesRead<>ByteAmount then
|
|
if BytesRead<>ByteAmount then
|
|
begin
|
|
begin
|
|
// SendDebug('FCGIRecord incomplete');
|
|
// SendDebug('FCGIRecord incomplete');
|