Fixed mbnews for empty headerlines

This commit is contained in:
Michiel Broek 2002-04-11 19:37:32 +00:00
parent f3d95121ad
commit 2d3b56ace7
3 changed files with 13 additions and 1 deletions

View File

@ -4705,6 +4705,10 @@ v0.33.20 10-Feb-2002
The tic file forward netmails now uses template forward.tic
When started a second time it doesn't destroy the lockfile
anymore.
When a converted email to news listserver message is processed
that has a header line starting with X-MS-, the headerline is
supressed because there is no key for this header. This looks
like a new kind of M$ standard. mbnews crashed on this one.
mbfile:
The mbfile index command now creates the html pages using the

View File

@ -112,6 +112,14 @@ rfcmsg *parsrfc(FILE *fp)
// Syslog('M', "This is a regular header");
cur->key = xstrcpy(buffer);
cur->val = xstrcpy(p+1);
} else if ((p=strchr(buffer,':')) && (!strncasecmp(buffer, (char *)"X-MS-", 5))) {
/*
* It looks like M$ invented their own internet standard, these
* are header lines without a key. This one will be stored here
* and junked in the rfc2ftn function.
*/
cur->key = xstrcpy(buffer);
cur->val = xstrcpy((char *)" ");
} else {
Syslog('M', "Non-header line: \"%s\"",buffer);
cur->key = xstrcpy((char *)"X-Body-Start");

View File

@ -445,7 +445,6 @@ int rfc2ftn(FILE *fp, faddr *recipient)
fprintf(ofp, "\001INTL %d:%d/%d %d:%d/%d\n", fmsg->to->zone, fmsg->to->net, fmsg->to->node,
fmsg->from->zone, fmsg->from->net, fmsg->from->node);
}
fprintf(ofp, "\001MSGID: %s %08lx\n", MBSE_SS(fmsg->msgid_a),fmsg->msgid_n);
if (fmsg->reply_s)
fprintf(ofp, "\1REPLY: %s\n", fmsg->reply_s);
@ -956,6 +955,7 @@ int needputrfc(rfcmsg *msg)
if (!strcasecmp(msg->key,"X-Origin-Date")) return 0;
if (!strncasecmp(msg->key,"X-PGP-",6)) return 0;
if (!strncasecmp(msg->key,"Resent-",7)) return 0;
if (!strncasecmp(msg->key,"X-MS-",5)) return -1;
if (!strcasecmp(msg->key,"X-Mailing-List")) return 0;
if (!strcasecmp(msg->key,"X-Loop")) return 0;
if (!strcasecmp(msg->key,"Precedence")) return 0;