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

Invalid number of bytes written reported #44

Closed mikegleasonjr closed 7 years ago

mikegleasonjr commented 7 years ago

When I have a buffer of a known length and try to write to the gzip handler, I get more bytes written than I originally sent. It think the latest commit is causing that.

b := f.buf[f.off:]
l := len(b)           // l is 104870
n, err := w.Write(b)  // w is my gziphandler (writer)
                      // n is 105079
adammck commented 7 years ago

Is this still the case since #42 was merged?

mikegleasonjr commented 7 years ago

Oh wow sorry I was 1 commit behind, didn't notice you did another commit after #41 👍

adammck commented 7 years ago

No problem, sorry about all the fuss.