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

Fix Write return val when gzip starts #42

Closed adammck closed 7 years ago

adammck commented 7 years ago

To fix the other half of #39. We currently return the length of the buffer which is being flushed, rather than the length of the Write which caused the flush. This can result in the bizarre situation of the sum of the return values of many Writes being greater than the number of bytes written.