aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-29 16:41:45 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-29 16:41:45 +0200
commit01e4e942dddd1c933ba92f32f77902390860d187 (patch)
tree493d8abbe43e0edcddb8a10ebfe39624e6def96c
parent09f3f66eb9e5006a66e4364ad20763cc2fd8161c (diff)
downloadmblaze-01e4e942dddd1c933ba92f32f77902390860d187.tar.gz
rfc2045: relax MIME check
Some mails don't have MIME-Version: 1.0, having Content-Transfer-Encoding shall be good enough either
-rw-r--r--rfc2045.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/rfc2045.c b/rfc2045.c
index c20f4c4..d225c73 100644
--- a/rfc2045.c
+++ b/rfc2045.c
@@ -13,11 +13,16 @@ int
blaze822_check_mime(struct message *msg)
{
char *v = blaze822_hdr(msg, "mime-version");
- return (v &&
+ if (v &&
v[0] && v[0] == '1' &&
v[1] && v[1] == '.' &&
v[2] && v[2] == '0' &&
- (!v[3] || iswsp(v[3])));
+ (!v[3] || iswsp(v[3])))
+ return 1;
+ v = blaze822_hdr(msg, "content-transfer-encoding");
+ if (v)
+ return 1;
+ return 0;
}
int