Commit 7a7dfeb8 authored by Kelsey Hightower's avatar Kelsey Hightower

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.
parent d102b9c8
......@@ -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)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment