From 314f9396cd140456a5e5a6d29e4d7741de0181f4 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Thu, 14 Dec 2017 10:26:08 -0500 Subject: [PATCH] 8311: Fix "read" or "write" mistakenly appended to response data. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- services/arv-git-httpd/auth_handler.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/arv-git-httpd/auth_handler.go b/services/arv-git-httpd/auth_handler.go index db37ebb326..e940c13ade 100644 --- a/services/arv-git-httpd/auth_handler.go +++ b/services/arv-git-httpd/auth_handler.go @@ -70,7 +70,9 @@ func (h *authHandler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) { // Nobody has called WriteHeader yet: that // must be our job. w.WriteHeader(statusCode) - w.Write([]byte(statusText)) + if statusCode >= 400 { + w.Write([]byte(statusText)) + } } // If the given password is a valid token, log the first 10 characters of the token. -- 2.30.2