+ if (strcasecmp (hf->name, TYPE_FIELD) != 0 &&
+ strcasecmp (hf->name, DISPO_FIELD) != 0) {
+ /* Only do this for Content-Type and
+ Content-Disposition fields because those are the
+ only headers that parse_mime() warns about. */
+ continue;
+ }
+
+ /* whitespace following a trailing ';' will be nuked as well */
+ if (hf->value[len - 1] == '\n') {
+ while (isspace((unsigned char)(hf->value[len - 2]))) {
+ if (len-- == 0) { break; }
+ }
+ }
+
+ if (hf->value[len - 2] == ';') {