[PATCH] emacs: bugfix attachment content-type as mime-type handling

Austin Clements amdragon at MIT.EDU
Tue Jul 30 19:25:29 PDT 2013


Quoth Mark Walters on Jul 30 at  5:15 pm:
> Notmuch puts attachments in as declared content-type except when the
> content-type is application/octet-stream it tries to guess the type
> from the filename/extension. This means that viewing a pdf (for
> example) which is sent as application/octet-strem invokes the pdf
> viewer rather than just offering to save the part.
> 
> Recent changes to the attachment handling (commit 1546387d) changed
> (broke) this. This patch stores the calculated mime-type with the part
> and changes the attachment part handlers can use it instead.
> ---
> This seems to fix the bug for me. I am not sure I like the naming
> (mime-type/content-type). Maybe it would be better to be explicit with
> something like calculated-content-type but probably that should be a
> more wholesale renaming.

Code LGTM, though I agree the naming could be better.  It would be
nice to have a test for this so we don't regress again in the future.


More information about the notmuch mailing list