]> git.cworth.org Git - notmuch/commitdiff
devel/nmweb: read mail files in binary mode.
authorDavid Bremner <david@tethera.net>
Sat, 16 Sep 2023 14:15:46 +0000 (11:15 -0300)
committerDavid Bremner <david@tethera.net>
Mon, 18 Sep 2023 09:13:25 +0000 (06:13 -0300)
"ju" reported on IRC that browsing

    https://nmbug.notmuchmail.org/nmweb/show/20160719094205.qmf5sjnja6crt5t3%40gotlib

crashed. The underlying issue is that python3 defaults to utf8
decoding files unless they are opened in binary mode. The file in
question (in the nmbug archive; it depends a bit on the routing the
message took) has

        Content-Type: text/plain; charset=iso-8859-1
        Content-Transfer-Encoding: 8bit

and some of it is not valid utf8.


No differences found