diff --git a/conversion_helpers.go b/conversion_helpers.go index 9d073e4..2cbdd40 100644 --- a/conversion_helpers.go +++ b/conversion_helpers.go @@ -171,12 +171,16 @@ func isPrintable(data []byte) bool { if !utf8.Valid(data) { return false } + isAllSpace := true for _, r := range string(data) { if !unicode.IsPrint(r) { return false } + if !unicode.IsSpace(r) { + isAllSpace = false + } } - return true + return !isAllSpace } func toPrintablePayload(payload []byte) string {