Prevent writing the receive-pack response to early
With the new way we handle Git HTTP subprocesses !118 (merged) there is a possibility we start writing an HTTP response before consuming the entire request. This may cause errors (none have been reported yet); this change introduces a buffer on the response writer that gets flushed once the request body has been consumed.
https://golang.org/pkg/net/http/#ResponseWriter
For HTTP/1.x requests, handlers should read any needed request body data before writing the response. Once the headers have been flushed (due to either an explicit Flusher.Flush call or writing enough data to trigger a flush), the request body may be unavailable.