Updating server dependancies. (#7538)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8b9dbb8613
Коммит
b84736e9b6
4
vendor/github.com/NYTimes/gziphandler/gzip.go
сгенерированный
поставляемый
4
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
|
||||
|
||||
Ссылка в новой задаче
Block a user