diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-09-29 12:46:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-29 12:46:30 -0700 |
commit | b84736e9b6401df0c6eeab9950bef09458a6aefd (patch) | |
tree | d9175208de3236db75a33879750a57b3000ba096 /vendor/github.com/NYTimes/gziphandler/gzip.go | |
parent | 8b9dbb86133ff0fd6002a391268383d1593918ca (diff) | |
download | chat-b84736e9b6401df0c6eeab9950bef09458a6aefd.tar.gz chat-b84736e9b6401df0c6eeab9950bef09458a6aefd.tar.bz2 chat-b84736e9b6401df0c6eeab9950bef09458a6aefd.zip |
Updating server dependancies. (#7538)
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 |