You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
It doesn't make sense to be able to configure the keepOpenOnPeerClosed behavior for HTTP.
Here is how spray-can should behave:
Client side
The Tcp.Register command to the IO layer (in the HttpClientConnection) should have keepOpenOnPeerClosed = settings.sslEncryption.
Additionally, because the SslTlsSupport pipeline stage might be active but encryption still be disabled, we need to always actively close the connection whenever we see a PeerClosed event (this logic needs to go into the ClientFrontend stage).
Server side
On the server-side it might be that the client half-closes the connection before having received the response. So we always enable keepOpenOnPeerClosed.
When we see a PeerClosed event we can close the connection immediately if no response is currently pending. Otherwise we switch into a mode that causes the last pending response that goes out to have a Connection: close header (which causes the ResponseRendering stage to actively close the connection when the response has been dispatched to the IO layer.
The text was updated successfully, but these errors were encountered:
It doesn't make sense to be able to configure the
keepOpenOnPeerClosed
behavior for HTTP.Here is how spray-can should behave:
Client side
The
Tcp.Register
command to the IO layer (in theHttpClientConnection
) should havekeepOpenOnPeerClosed = settings.sslEncryption
.Additionally, because the
SslTlsSupport
pipeline stage might be active but encryption still be disabled, we need to always actively close the connection whenever we see aPeerClosed
event (this logic needs to go into theClientFrontend
stage).Server side
On the server-side it might be that the client half-closes the connection before having received the response. So we always enable
keepOpenOnPeerClosed
.When we see a
PeerClosed
event we can close the connection immediately if no response is currently pending. Otherwise we switch into a mode that causes the last pending response that goes out to have aConnection: close
header (which causes theResponseRendering
stage to actively close the connection when the response has been dispatched to the IO layer.The text was updated successfully, but these errors were encountered: