Where #58 juggled calling WriteHeader within Flush, this pull request simply makes Flush a no-op while the response is buffering, i.e. until it reaches the minimum size.
In reverting 0f67f3f, it has the side-effect of reducing the size of the per-request GzipResponseWriter struct from 104 bytes to 96 bytes.
This fixes the bug I noted in https://github.com/NYTimes/gziphandler/pull/58#issuecomment-343036704. In doing so, it reverts 0f67f3f, which was #58, and commits a different fix for that issue.
Where #58 juggled calling
WriteHeader
withinFlush
, this pull request simply makesFlush
a no-op while the response is buffering, i.e. until it reaches the minimum size.In reverting 0f67f3f, it has the side-effect of reducing the size of the per-request
GzipResponseWriter
struct from 104 bytes to 96 bytes.