X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhbuild.c;h=1fdedb6612f3d66c9e977d502e4f6e44ce23df01;hp=140cfdb39dc669f5704e28559ef7cd8d9138570d;hb=5d690daafbcd4ed26d19610fcc017999ee5af892;hpb=e16d5bfc58d8b0dfe61701cd4d6b1732e837d60a diff --git a/uip/mhbuild.c b/uip/mhbuild.c index 140cfdb..1fdedb6 100644 --- a/uip/mhbuild.c +++ b/uip/mhbuild.c @@ -319,6 +319,7 @@ build_mime(char *infile) struct part **pp; CT ct; FILE *in; + HF hp; umask(~m_gmprot()); @@ -411,6 +412,16 @@ finish_field: } /* + ** Iterate through the list of headers and call the function to + ** MIME-ify them if required. + */ + 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 +1540,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); }