char *cp;
struct headers *hdr;
- /* remove all leading whitespace (even newlines) */
- while (*str==' ' || *str=='\t' || *str=='\n') {
+ /* remove leading whitespace */
+ while (*str==' ' || *str=='\t') {
str++;
}
if ((i = get_header(name, hdrtab)) == NOTOK) {
- /* no header we would care for: push it through */
- fprintf(out, "%s: %s", name, str);
+ /* no header we would care for */
+ if (mh_strcasecmp(name, attach_hdr)!=0 &&
+ mh_strcasecmp(name, sign_hdr)!=0 &&
+ mh_strcasecmp(name, enc_hdr)!=0) {
+ /* push it through */
+ fprintf(out, "%s: %s", name, str);
+ }
return;
}
/* it's one of the interesting headers */
hdr = &hdrtab[i];
- if (hdr->flags & HIGN || !*str) {
+ if (hdr->flags & HIGN || strcmp(str, "\n")==0) {
return;
}