Does nginx allow an upstream server to respond to and close a request before it has finished?

You don't mention what your clients are, however, this sounds like something that you would achieve with an expect header. In essence, the client sets an "Expect" header with a "100-continue" expectation. The client then waits for a 100 Continue response from the server, before sending its request body.

If the server does not want to receive the body, it can respond with a final status, and the client does not send the body.

This process is defined in RFC2616, section 8.2.3


https://forum.nginx.org/read.php?2,254918,254918#msg-254918 mention RFC2616, 8.2.2 also is related:

According to RFC2616, 8.2.2 1 if the request contained a Content-Length and the client (nginx in this case) ceases to transmit the body (due to an error response) the client (nginx) would have to close the connection