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
0.14.20 Platform
Linux kwephis1142986 4.18.0-147.5.2.1.h579.eulerosv2r10.x86_64 #1 SMP Sat Jul 31 09:58:46 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Description
I send a POST request with a large body, and the server responds with 503 immediately before reading the body. Then hyper receives the body data at this time and returns the rst message
I expected to see this happen:
Hope to close the connection gracefully without sending rst
The text was updated successfully, but these errors were encountered:
It's hard to know what happened without see the server code.
But if you replied with a 503 immediately without reading request body, then the OS will usually send a RST since it is closing the connection with data still unread.
@seanmonstar I found some information about fix this problem. we can use shutdown().If we shutdown the write direction of the connection before calling close, we avoid the RST behavior. can you fix this problem in hyper by calling shutdown before close connection?
Version
0.14.20
Platform
Linux kwephis1142986 4.18.0-147.5.2.1.h579.eulerosv2r10.x86_64 #1 SMP Sat Jul 31 09:58:46 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Description
I send a POST request with a large body, and the server responds with 503 immediately before reading the body. Then hyper receives the body data at this time and returns the rst message
I expected to see this happen:
Hope to close the connection gracefully without sending rst
The text was updated successfully, but these errors were encountered: