Consider an http server that reflects the body of a request into the response. In pseudocode:
recv_req_headers()
send_resp_headers()
while have_req_body_data:
chunk = recv_req_body_chunk()
send_resp_body_chunk(chunk)
Similarly, consider an http client that sends the whole request before reading the response:
send_req_headers()
send_req_body()
recv_resp_headers()
recv_resp_body()
Now, when these two try to communicate, they deadlock, as the server will stop consuming the request once its send buffers are full. At that point, both sides are blocked in an attempt to send data to the other side.
Which side is in violation of the HTTP specs? I've read through RFC 7230 and RFC 7231 but failed to find guidance in either. There are similar questions, but no satisfactory answers.