Fix middleware when used with prettyfier and gzip encoding

If while decompressing gzip payload decompressed value was less then
compressed, it did not changed buffer length, and middleware received
bytes left from gzip response.
This commit is contained in:
Leonid Bugaev
2017-02-26 20:54:26 +03:00
parent e1f3d71f4e
commit c8dfe67ccb
+1
View File
@@ -71,6 +71,7 @@ func (m *Middleware) copy(to io.Writer, from io.Reader) {
if Settings.prettifyHTTP {
payload = prettifyHTTP(payload)
nr = len(payload)
}
hex.Encode(dst, payload)