commit d9866b46a35ac8ebf46db2ecbf1b7d62b9f88407
parent eb0418f9817b86b09ca913a93bcf704b376ff97e
Author: Christoph Lohmann <20h@r-36.net>
Date: Sat, 20 Jan 2018 15:40:08 +0100
Fix issues with wrong mime types in multipart mails.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mime.c b/mime.c
@@ -723,7 +723,8 @@ mime_parseheader(char *field)
}
free(buf);
- if (ret->len > 1)
+ //printf("ret->len = %d\n", ret->len);
+ if (ret->len > 0)
return mime_sanitizeparams(ret);
llist_free(ret);
@@ -828,6 +829,7 @@ mime_preparepart(mime_t *mime)
if (hdr != NULL && hdr->data != NULL && strlen(hdr->data) > 0) {
//printf("content-type: %s\n", (char *)hdr->data);
hdrf = mime_parseheader(hdr->data);
+ //printf("hdrf = %p\n", hdrf);
//printf("%s\n", hdrf->first->key);
if (hdrf != NULL) {
if (!strncasecmp(hdrf->first->key, "multipart", 9)) {