1
0
Fork 0
mirror of https://git.sr.ht/~rjarry/aerc synced 2025-08-01 22:24:22 +02:00
aerc/lib/rfc822/testdata/message/malformed/hexa
Koni Marti c2048ef304 rfc822: parse multipart messages on a best efforts basis
Parse multipart messages on a best-efforts basis. Allow the user to see
as much of the message as possible, but log the errors.

If a charset or encoding error is encountered for a message part of a
multipart message, the error is logged and ignored. In those cases, we
still get a valid message body but the content is just not decoded or
converted. No error will be propagated.

If a multipart message cannot be parsed, ParseEntityStructure will
return a multipart error. This error indicates that the message is
malformed and there is nothing more we can do. The caller is then
advised to use a single text/plain body structure using
CreateTextPlainPart() to provide the entire message content to the user.

Fixes: https://todo.sr.ht/~rjarry/aerc/288
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2024-11-21 22:27:19 +01:00

26 lines
820 B
Text

Subject: Confirmation Needed gUdVJQBhsd
Content-Type: multipart/mixed; boundary="Nextpart_1Q2YJhd197991794467076Pgfa"
To: <BORK@example.com>
From: ""REGISTRAR"" <zdglopi-1Q2YJhd-noReply@example.com>
--Nextpart_1Q2YJhd197991794467076Pgfa
Content-Type: multipart/parallel; boundary="sg54sd54g54sdg54"
--sg54sd54g54sdg54
Content-Type: multipart/alternative; boundary="54qgf54q546f46qsf46qsf"
--54qgf54q546f46qsf46qsf
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: Hexa
--54qgf54q546f46qsf46qsf
Content-Type: text/html; charset=utf-8
<CeNteR><a hRef="https://example.com-ap-southeast-example.com.com/example.com#qs=r-acacaeehdiebadgdhgghcaegckhabababaggacihaccajfbacccgaehhbkacb"><b><h2>Congratulations Netflix Customer!</h2></b></a><br>
<HeaD>
<ObJECT>
--Nextpart_1Q2YJhd197991794467076Pgfa--