nytimes / gziphandler

Go middleware to gzip HTTP responses
https://godoc.org/github.com/NYTimes/gziphandler
Apache License 2.0
868 stars 129 forks source link

Incorrect check for short write #103

Open duncanharris opened 4 years ago

duncanharris commented 4 years ago

https://github.com/nytimes/gziphandler/blob/2f8bb1d30d9d69c8e0c3714da5a9917125a87769/gzip.go#L202

len(w.buf) is always zero at this point because of previous line: w.buf = nil