Skip to content

Commit

Permalink
Handle gzip encoding error
Browse files Browse the repository at this point in the history
Fix #470
  • Loading branch information
buger committed Jun 24, 2017
1 parent 4fe95be commit aa4a878
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions emitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions http_prettifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func prettifyHTTP(p []byte) []byte {

if err != nil {
Debug("[Prettifier] GZIP encoding error:", err)
return []byte{}
}

content, _ = ioutil.ReadAll(g)
Expand Down

0 comments on commit aa4a878

Please sign in to comment.