diff options
Diffstat (limited to 'vendor/github.com/NYTimes/gziphandler/gzip.go')
-rw-r--r-- | vendor/github.com/NYTimes/gziphandler/gzip.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/github.com/NYTimes/gziphandler/gzip.go b/vendor/github.com/NYTimes/gziphandler/gzip.go index c47039fd3..b6af9115a 100644 --- a/vendor/github.com/NYTimes/gziphandler/gzip.go +++ b/vendor/github.com/NYTimes/gziphandler/gzip.go @@ -105,7 +105,7 @@ func (w *GzipResponseWriter) Write(b []byte) (int, error) { // If the global writes are bigger than the minSize and we're about to write // a response containing a content type we want to handle, enable // compression. - if len(w.buf) >= w.minSize && handleContentType(w.contentTypes, w) { + if len(w.buf) >= w.minSize && handleContentType(w.contentTypes, w) && w.Header().Get(contentEncoding) == "" { err := w.startGzip() if err != nil { return 0, err @@ -134,7 +134,7 @@ func (w *GzipResponseWriter) startGzip() error { // Initialize the GZIP response. w.init() - // Flush the buffer into the gzip reponse. + // Flush the buffer into the gzip response. n, err := w.gw.Write(w.buf) // This should never happen (per io.Writer docs), but if the write didn't |