From 065f2c7ef20d51d51076d65348ca588e04853c00 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer <jacob@gitlab.com> Date: Wed, 19 Apr 2017 11:14:48 +0200 Subject: [PATCH] Acknowledge no-op --- internal/git/git-http.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/git/git-http.go b/internal/git/git-http.go index 21b9a808d5631..c50478305c592 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)) } -- GitLab