Improve documentation
This commit is contained in:
parent
8cd82605dd
commit
b35747bf31
2
gzip.go
2
gzip.go
@ -20,6 +20,8 @@ type gzipResponseWriter struct {
|
|||||||
http.ResponseWriter
|
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) {
|
func (w *gzipResponseWriter) WriteHeader(status int) {
|
||||||
w.Header().Del("Content-Length")
|
w.Header().Del("Content-Length")
|
||||||
w.ResponseWriter.WriteHeader(status)
|
w.ResponseWriter.WriteHeader(status)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user