diff --git a/response.go b/response.go index a6f40f5..3932ae4 100644 --- a/response.go +++ b/response.go @@ -219,6 +219,10 @@ func (w *responseWriter) Write(b []byte) (int, error) { } func (w *responseWriter) WriteHeader(statusCode int, meta string) { + if w.wroteHeader { + return + } + if StatusClass(statusCode) == StatusSuccess { w.bodyAllowed = true }