X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhbuild.c;h=d636cf7c7d069133e4ceeb1059ba24be5ee7b8ae;hp=140cfdb39dc669f5704e28559ef7cd8d9138570d;hb=0595979e1f0514b3da28762f336b3b9ac9eec5c5;hpb=4c30d368bca8b3f108a7e86a5b890e33470cdebf diff --git a/uip/mhbuild.c b/uip/mhbuild.c index 140cfdb..d636cf7 100644 --- a/uip/mhbuild.c +++ b/uip/mhbuild.c @@ -411,6 +411,18 @@ finish_field: } /* + * Iterate through the list of headers and call the function to MIME-ify + * them if required. + */ + + HF hp; + for (hp = ct->c_first_hf; hp != NULL; hp = hp->next) { + if (encode_rfc2047(hp->name, &hp->value, NULL)) { + adios(EX_DATAERR, NULL, "Unable to encode header \"%s\"", hp->name); + } + } + + /* ** Now add the MIME-Version header field ** to the list of header fields. */ @@ -1529,6 +1541,9 @@ build_headers(CT ct) if (ct->c_descr) { np = getcpy(DESCR_FIELD); vp = concat(" ", ct->c_descr, NULL); + if (encode_rfc2047(DESCR_FIELD, &vp, NULL)) { + adios(EX_DATAERR, NULL, "Unable to encode %s header", DESCR_FIELD); + } add_header(ct, np, vp); }