[PATCH aerc] jmap: ignore charset encoding error
Export this patch
Ignore and log a charset error when fetching a message part.
Reported-by: Matěj Cepl <mcepl@cepl.eu>
Signed-off-by: Koni Marti <koni.marti@gmail.com>
---
Acked-by: Robin Jarry <robin@jarry.cc>
Applied, thanks.
To git@git.sr.ht:~rjarry/aerc
161569293b80..6736cf04020f master -> master
worker/jmap/fetch.go | 5 +++ --
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/worker/jmap/fetch.go b/worker/jmap/fetch.go
index 3b3a8460..de32ee99 100644
--- a/worker/jmap/fetch.go
+++ b/worker/jmap/fetch.go
@@ -134,9 +134,10 @@ func (w *JMAPWorker) handleFetchMessageBodyPart(msg *types.FetchMessageBodyPart)
if strings.HasPrefix(part.Type, "text/") && part.Charset != "" {
r, err := charset.Reader(part.Charset, reader)
if err != nil {
- return fmt.Errorf("charset.Reader: %w", err)
+ w.w.Warnf("charset.Reader: %v", err)
+ } else {
+ reader = r
}
- reader = r
}
w.w.PostMessage(&types.MessageBodyPart{
Message: types.RespondTo(msg),
--
2.47.0
aerc/patches: SUCCESS in 2m7s
[jmap: ignore charset encoding error][0] from [Koni Marti][1]
[0]: https://lists.sr.ht/~rjarry/aerc-devel/patches/56348
[1]: mailto:koni.marti@gmail.com
✓ #1384553 SUCCESS aerc/patches/openbsd.yml https://builds.sr.ht/~rjarry/job/1384553
✓ #1384552 SUCCESS aerc/patches/alpine-edge.yml https://builds.sr.ht/~rjarry/job/1384552
Koni Marti <koni.marti@gmail.com> wrote: