tFix issues with wrong mime types in multipart mails. - rohrpost - A commandline mail client to change the world as we see it.
 (HTM) git clone git://r-36.net/rohrpost
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit d9866b46a35ac8ebf46db2ecbf1b7d62b9f88407
 (DIR) parent eb0418f9817b86b09ca913a93bcf704b376ff97e
 (HTM) 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:
         mime.c                              |       4 +++-
       
       1 file changed, 3 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/mime.c b/mime.c
       t@@ -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);
       t@@ -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)) {