diff --git a/gzip.go b/gzip.go index ebae3291..4ccc0206 100644 --- a/gzip.go +++ b/gzip.go @@ -20,6 +20,8 @@ type gzipResponseWriter struct { http.ResponseWriter } +// WriteHeader sends an HTTP response header with the provided status code. +// It also deletes the Content-Length header, since the GZIP compression may modify the size of the payload func (w *gzipResponseWriter) WriteHeader(status int) { w.Header().Del("Content-Length") w.ResponseWriter.WriteHeader(status)