]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Rewrite content ID handling
authorAustin Clements <amdragon@mit.edu>
Sat, 24 Jan 2015 21:17:02 +0000 (16:17 -0500)
committerDavid Bremner <david@tethera.net>
Sun, 25 Jan 2015 17:39:13 +0000 (18:39 +0100)
Besides generally cleaning up the code and separating the general
content ID handling from the w3m-specific code, this fixes several
problems.

Foremost is that, previously, the code roughly assumed that referenced
parts would be in the same multipart/related as the reference.
According to RFC 2392, nothing could be further from the truth:
content IDs are supposed to be globally unique and globally
addressable.  This is nonsense, but this patch at least fixes things
so content IDs can be anywhere in the same message.

As a side-effect of the above, this handles multipart/alternate
content-IDs more in line with RFC 2046 section 5.1.2 (not that I've
ever seen this in the wild).  This also properly URL-decodes cid:
URLs, as per RFC 2392 (the previous code did not), and applies crypto
settings from the show buffer (the previous code used the global
crypto settings).


No differences found