diff --git a/internal/git/git-http.go b/internal/git/git-http.go index 21b9a808d5631c04d3424ad263de1a82d4e900fe..c50478305c592f8eed8a9a6fd2d8e401f31b405b 100644 --- a/internal/git/git-http.go +++ b/internal/git/git-http.go @@ -39,6 +39,8 @@ func postRPCHandler(a *api.API, name string, handler func(*GitHttpResponseWriter }() if err := handler(w, r, ar); err != nil { + // If the handler already wrote a response this WriteHeader call is a + // (harmless) no-op. w.WriteHeader(500) helper.LogError(r, fmt.Errorf("%s: %v", name, err)) }