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
I've noticed that a response with status 204 to, e.g., a POST request always results in a timeout if the connection is kept alive. RFC9110 specifies in 8.6 (https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length) that A server MUST NOT send a Content-Length header field in any response with a status code of 1xx (Informational) or 204 (No Content).
It seems that the library is still trying to parse the body of a 204 response. But since the header of such a response does not contain a Content-Length field, contentLengthReceived stays false and the library tries to receive more data via the socket. If the server closes the connection, we won't receive any more data from the socket and the function returns the response. But if the connection is kept-alive, the socket.recv()-call will timeout as the server is not sending any more data but the socket is still open.
The text was updated successfully, but these errors were encountered:
Hi,
I've noticed that a response with status 204 to, e.g., a POST request always results in a timeout if the connection is kept alive. RFC9110 specifies in 8.6 (https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length) that
A server MUST NOT send a Content-Length header field in any response with a status code of 1xx (Informational) or 204 (No Content).
It seems that the library is still trying to parse the body of a 204 response. But since the header of such a response does not contain a
Content-Length
field,contentLengthReceived
staysfalse
and the library tries to receive more data via the socket. If the server closes the connection, we won't receive any more data from the socket and the function returns the response. But if the connection is kept-alive, thesocket.recv()
-call will timeout as the server is not sending any more data but the socket is still open.The text was updated successfully, but these errors were encountered: