Fix race preventing handling of the last request sent over a connection
We need to attempt to consume start lines and headers even after SocketInput.RemoteIntakeFin is set to true to ensure we don't close a connection without giving the application a chance to respond to a request sent immediately before the a FIN from the client.
This commit is contained in:
parent
84a68208d0
commit
792f3ad089
|
|
@ -37,8 +37,14 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Http
|
|||
{
|
||||
if (SocketInput.RemoteIntakeFin)
|
||||
{
|
||||
if (TakeStartLine(SocketInput))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
await SocketInput;
|
||||
}
|
||||
|
||||
|
|
@ -48,8 +54,14 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Http
|
|||
{
|
||||
if (SocketInput.RemoteIntakeFin)
|
||||
{
|
||||
if (TakeMessageHeaders(SocketInput, FrameRequestHeaders))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
await SocketInput;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue