X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-mime%2Frfc2231.c;h=b5a25536ca810eee26eb61bdb7399c500e396627;hp=ff6a02c8a57073cc4bb7af5a0d31428a1075352a;hb=c01e17f6b99066ca30931a082ea855656174619b;hpb=22601f25ede6703ba7cd06ee84eddd2045308570 diff --git a/lib-mime/rfc2231.c b/lib-mime/rfc2231.c index ff6a02c..b5a2553 100644 --- a/lib-mime/rfc2231.c +++ b/lib-mime/rfc2231.c @@ -47,6 +47,7 @@ #include #include "charset.h" +#include "mutt.h" typedef struct rfc2231_param { struct rfc2231_param *next; @@ -139,8 +140,7 @@ static void purge_empty_parameters(PARAMETER **headp) PARAMETER *p = *headp; if (!p->attribute || !p->value) { - *headp = p->next; - p->next = NULL; + p = parameter_list_pop(headp); parameter_delete(&p); } else { headp = &(*headp)->next; @@ -242,8 +242,8 @@ void rfc2231_decode_parameters (PARAMETER ** headp) if (option (OPTRFC2047PARAMS) && p->value && strstr (p->value, "=?")) rfc2047_decode (&p->value); else if (!option (OPTSTRICTMIME)) { - if (ascii_strcasecmp (AssumedCharset, "us-ascii")) - mutt_convert_nonmime_string (&p->value); + if (mime_which_token(AssumedCharset, -1) == MIME_US_ASCII) + mutt_convert_nonmime_string(&p->value); } *last = p;