W3C home > Mailing lists > Public > www-talk@w3.org > January to February 1996

Possible Hypermail problem and fix

From: Martin Hamilton <martin@mrrl.lut.ac.uk>
Date: Wed, 10 Jan 1996 13:07:31 +0000
Message-Id: <199601101307.NAA22792@gizmo.lut.ac.uk>
To: martin@mrrl.lut.ac.uk
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


*** 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;
  }
Received on Wednesday, 10 January 1996 08:12:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:19 GMT