diff --git a/middleware/recoverer.go b/middleware/recoverer.go index 8fa69bad..612e155a 100644 --- a/middleware/recoverer.go +++ b/middleware/recoverer.go @@ -36,7 +36,9 @@ func Recoverer(next http.Handler) http.Handler { PrintPrettyStack(rvr) } - w.WriteHeader(http.StatusInternalServerError) + if r.Header.Get("Connection") != "Upgrade" { + w.WriteHeader(http.StatusInternalServerError) + } } }()