mirror of https://github.com/k3s-io/k3s
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.pull/6/head
parent
d102b9c845
commit
7a7dfeb85b
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue