diff --git a/emitter.go b/emitter.go index e2c8beb5..8e4180c2 100644 --- a/emitter.go +++ b/emitter.go @@ -102,6 +102,9 @@ func CopyMulty(src io.Reader, writers ...io.Writer) (err error) { if Settings.prettifyHTTP { payload = prettifyHTTP(payload) + if len(payload) == 0 { + continue + } } if Settings.splitOutput { diff --git a/http_prettifier.go b/http_prettifier.go index fa4360c7..3a6c4262 100644 --- a/http_prettifier.go +++ b/http_prettifier.go @@ -52,6 +52,7 @@ func prettifyHTTP(p []byte) []byte { if err != nil { Debug("[Prettifier] GZIP encoding error:", err) + return []byte{} } content, _ = ioutil.ReadAll(g)