Closed alexandrestein closed 7 years ago
🎉 🌮 !
I hope it will helps.
The w.WriteHeader() call sets "Content-Encoding: gzip" by default, even though the subsequent call to w.Write() is not gzip encoded.
@aravindc26 is correct. The test covers the case when WriteHeader
is called implicitly by Write
(because it returns early, so skips the call to init
, which sets the encoding header), but not when it's called directly. Sorry that I missed this when reviewing. @alexandreStein, please feel free to resubmit with a fix, or one of us can patch it up later. Reverting.
This make possible to skip compression if the response is smaller than the specified size.