If the application does not supply a Content-Length header, a server or gateway may choose one of several approaches to handling it.
close the client connection when the response is completed.
If the application does not call the write() callable, and returns an iterable whose len() is 1, then the server can automatically determine Content-Length by taking the length of the first string yielded by the iterable.
And, if the server and client both support HTTP/1.1 "chunked encoding", then the server may use chunked encoding to send a chunk for each write() call or string yielded by the iterable, thus generating a Content-Length header for each chunk.
I'd prefer to continue NOT specifying Content-Length manually.
Neither the Static WSGI code, nor the Git-RPC-specific code set the Content-Length header on the response.
This means that some WSGI servers may set that header incorrectly or omit it altogether, resulting in git client not reading the complete response.