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

check minsize when writing first byte #91

Open drewbailey opened 4 years ago

drewbailey commented 4 years ago

Fix bug where writing and flushing a zero byte write would cause startGzip() to run but not write, and then on subsequent writes call startPlain, resulting in invalid header errors

drewbailey commented 4 years ago

I removed the invalid fix, but left the test case up there showing the issue we are running into