[9566] in www-talk@info.cern.ch
Possible Hypermail problem and fix
daemon@ATHENA.MIT.EDU (Martin Hamilton)
Wed Jan 10 08:15:35 1996
To: martin@mrrl.lut.ac.uk
Date: Wed, 10 Jan 1996 13:07:31 +0000
From: Martin Hamilton <martin@mrrl.lut.ac.uk>
Resent-From: www-talk@w3.org
This is a multipart MIME message.
--===_0_Wed_Jan_10_12:43:15_GMT_1996
Content-Type: text/plain; charset=us-ascii
Sorry for the cross-posting, but I guess this will interest anyone
who uses Hypermail to archive their mailing lists...
A subscriber was complaining that his posts weren't being archived,
and on investigation I discovered that Hypermail would get confused
and fall over if given a "Message-Id:" header which doesn't have
the message ID itself enclosed in '<' and '>'
So, I just thought I'd pass the message on. I've attached a simple
minded (and unofficial) fix for the problem which seems to work for
me - your mileage may vary!
Cheerio,
Martin
--===_0_Wed_Jan_10_12:43:15_GMT_1996
Content-Type: text/plain; charset=us-ascii
Content-Description: parse.c.patch - be liberal in what you accept!
*** parse.c.FCS Wed Jan 10 08:25:50 1996
--- parse.c Wed Jan 10 08:45:37 1996
***************
*** 630,636 ****
char *c;
static char msgid[MSGDSTRLEN];
! c = (char *) strchr(line, '<') + 1;
for (i = 0; *c && *c != '>' && *c != '\n' && i < MSGDSTRLEN; c++) {
if (*c == '\\')
continue;
--- 630,645 ----
char *c;
static char msgid[MSGDSTRLEN];
! if ((char *)strchr(line, '<') == NULL) {
! /* bozo alert!
! ** msg-id = "<" addr-spec ">"
! ** try to recover as best we can
! */
! c = (char *) strchr(line, ':') + 1; /* we know this exists! */
! while (*c && *c == ' ') c++; /* skip spaces before message ID */
! } else {
! c = (char *) strchr(line, '<') + 1;
! }
for (i = 0; *c && *c != '>' && *c != '\n' && i < MSGDSTRLEN; c++) {
if (*c == '\\')
continue;
***************
*** 637,642 ****
--- 646,653 ----
msgid[i++] = *c;
}
msgid[i] = '\0';
+
+ if (strlen(msgid) == 0) strcpy(msgid, "BOZO");
return msgid;
}
--===_0_Wed_Jan_10_12:43:15_GMT_1996--