Consume gzip stream in test

Also close writer since this test previously failed due to truncated
output.
This commit is contained in:
Andrew Gaul
2017-01-18 19:29:35 -08:00
parent f8cb20ade6
commit ecfa095a14
2 changed files with 6 additions and 2 deletions

View File

@ -38,7 +38,7 @@ func (t *Gzip) Transcode(w *proxy.ResponseWriter, r *proxy.ResponseReader, heade
if err != nil {
return err
}
defer gzw.Flush()
defer gzw.Close()
w.Writer = gzw
w.Header().Set("Content-Encoding", "gzip")
}