Re: [bug] notmuch requires Content-Disposition mime header value to be lower case

Subject: Re: [bug] notmuch requires Content-Disposition mime header value to be lower case

Date: Fri, 18 Sep 2015 10:26:00 -0300

To: Johannes Schauer, notmuch@notmuchmail.org

Cc:

From: David Bremner


Johannes Schauer <josch@debian.org> writes:

> Hi,
>
> Quoting David Bremner (2015-09-18 14:03:20)
>> I'd recommend making your own new test, rather than modifying existing
>> ones to test multiple things.  I'd also recommend using json / sexp
>> output for your tests, since the ad-hoc text format is kindof
>> semi-deprecated.
>
> can you take care of that? My goal was actually just to report this bug, not to
> spend more time to develop a proper patch for it :)

Consider the bug reported. At the moment I'm not completely convinced
the patch is correct, never mind the tests. I agree it looks obvious
enough, but the test results don't make sense to me yet.

>
> Also, a related problem occurs when the Content-Disposition header contains
> UTF8 characters, in which case the header value gets encoded. Apparently
> notmuch does not attempt to decode it. Example mime header:
>
> --===============7161366892858136962==
> Content-Type: application/pdf
> MIME-Version: 1.0
> Content-Transfer-Encoding: base64
> Content-Disposition: =?utf-8?b?YXR0YWNobWVudDsgZmlsZW5hbWU9ImJlZ3LDvMOfdW5n?=
>  =?utf-8?b?LnBkZiI=?=

yes, that sounds like a distinct bug.

Thread: