From 7a7dfeb85bd5371907fe907c888571e6abcb0083 Mon Sep 17 00:00:00 2001 From: Kelsey Hightower Date: Sat, 26 Jul 2014 16:09:15 -0700 Subject: [PATCH] integration: Fix multiple response.WriteHeader calls The current integration tests do not return after delegating HTTP requests, as a result an extra call to response.WriteHeader is made for every request. Fix the issue by returning after delegating HTTP requests. --- cmd/integration/integration.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index 7309e4799e..ae99ed951f 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -74,6 +74,7 @@ type delegateHandler struct { func (h *delegateHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { if h.delegate != nil { h.delegate.ServeHTTP(w, req) + return } w.WriteHeader(http.StatusNotFound) }