diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2016-12-27 13:12:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-27 13:12:46 +0000 |
commit | d5ea31204df5c41d798003d16222dec2c6ab0ed5 (patch) | |
tree | c2d84cf938f1b2ee7e7269edb53eb78c0a303401 | |
parent | d8c2f41a42df1893c593c33bc5f8fdcb3f67e1e9 (diff) | |
parent | d10865dd54160f5c4d49c4cc13d44aa7732fce65 (diff) |
Merge pull request #937 from pazz/contentdisposition-899
Fix for case-(in)sensitive MIME matching.
-rw-r--r-- | alot/db/message.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/alot/db/message.py b/alot/db/message.py index de535d37..5566fa64 100644 --- a/alot/db/message.py +++ b/alot/db/message.py @@ -232,12 +232,12 @@ class Message(object): content = part.get_payload(decode=True) ct = helper.guess_mimetype(content) - if cd.startswith('attachment'): - if ct not in ['application/pgp-encrypted', + if cd.lower().startswith('attachment'): + if ct.lower() not in ['application/pgp-encrypted', 'application/pgp-signature']: self._attachments.append(Attachment(part)) - elif cd.startswith('inline'): - if filename is not None and ct != 'application/pgp': + elif cd.lower().startswith('inline'): + if filename is not None and ct.lower() != 'application/pgp': self._attachments.append(Attachment(part)) return self._attachments |