Buffer git-receive-pack responses
Compare changes
Conflict: This file was modified in both the source and target branches.
Ask someone with write access to resolve it.
+ 23
− 4
@@ -7,6 +7,7 @@ package git
@@ -139,18 +140,30 @@ func handlePostRPC(w http.ResponseWriter, r *http.Request, a *api.Response) {
@@ -168,3 +181,9 @@ func pktFlush(w io.Writer) error {
This might be a problem. During a (succesful) long push there is a risk of timeouts already, because it can take a long time before
git receive-pack
prints any output to stdout. That creates a long 'silence' in the HTTP response which can cause intermediate proxies like HAProxy and NGINX to terminate the request.If we buffer the entire response we may be increasing the delay even more.
On the other hand I am not sure if this is where we should be solving the 'long silence' problem.