From 6098f43620f3277c824593ccb9a0ef6bc8906d24 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 27 Oct 2020 19:22:23 +0100 Subject: [PATCH] message: bubble encoding errors to WalkFunc Only charset errors were forwarded. --- entity.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entity.go b/entity.go index 55bb6d16..99e69c89 100644 --- a/entity.go +++ b/entity.go @@ -164,7 +164,7 @@ func (e *Entity) Walk(walkFunc WalkFunc) error { multipartReaders = multipartReaders[:len(multipartReaders)-1] path = path[:len(path)-1] continue - } else if IsUnknownCharset(err) { + } else if IsUnknownEncoding(err) || IsUnknownCharset(err) { // Forward the error to walkFunc } else if err != nil { return err