Regards,
Joey
Return-Path: <joey_at_master.debian.org> Received: at Infodrom Oldenburg (/\##/\ Smail3.1.29.1 #29.12 Joey)
by finlandia.Infodrom.North.DE from master.debian.org with smtp id <m0ykV97-001MuqC>; Fri, 12 Jun 98 16:49 MET DST Received: from ([205.229.104.5]) by teergrube (0 sec delayed, relaying denied) Received: (qmail 14024 invoked by uid 847); 12 Jun 1998 14:48:27 -0000Received: (qmail 14011 invoked from network); 12 Jun 1998 14:48:26 -0000 Received: from debian.novare.net (HELO submailer.bugs.debian.org) (iwj_at_205.229.104.5) by debian.novare.net with SMTP; 12 Jun 1998 14:48:26 -0000 Received: by submailer.bugs.debian.org id m0ykUeX-001sBZC
(Debian /\oo/\ Smail3.1.29.1 #29.35); Fri, 12 Jun 98 09:18 CDT Subject: Bug#23453: strncasecmp should be used for headers Reply-To: Erv Walter <edwalter_at_iname.com>, 23453_at_bugs.debian.org
Resent-From: Erv Walter <edwalter_at_iname.com> Resent-To: debian-bugs-dist_at_lists.debian.org Resent-CC: Martin Schulze <joey_at_debian.org> Resent-Date: Fri, 12 Jun 1998 14:18:01 GMT Resent-Message-ID: <handler.23453.B.89766078312111_at_bugs.debian.org> Resent-Sender: iwj_at_debian.org X-Debian-PR-Message: report 23453 X-Debian-PR-Package: hypermail
(code B ref -1); Fri, 12 Jun 1998 14:18:01 GMT
Message-ID: <19980612091252.A2897_at_cne.dynip.com>
Date: Fri, 12 Jun 1998 09:12:52 -0500
From: Erv Walter <edwalter_at_iname.com>
To: submit_at_bugs.debian.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.91.1i
X-Status: F
Package: hypermail
Version: 1.02-8
Since rcf822 allows headers to be case insensitive, strncasecmp should be used to identify them in parse.c. I specifically had trouble with Message-ID vs. Message-Id. hypermail was ignoring the former, which is fairly common in the messages i was archiving.
Here is a patch:
--- hypermail-1.02/parse.c Fri Jun 12 08:59:52 1998 +++ hypermail-1.02.new/parse.c Fri Jun 12 08:46:28 1998
_at_@ -73,33 +73,33 @@
} while (fgets(line, MAXLINE, fp) != NULL) { if (isinheader) { - if (!strncmp(line, "Received:", 9) || - !strncmp(line, "Return-Path:", 12) || - !strncmp(line, "Cc:", 3) || - !strncmp(line, "X-", 2) || - !strncmp(line, "Flags:", 6)) + if (!strncasecmp(line, "Received:", 9) || + !strncasecmp(line, "Return-Path:", 12) || + !strncasecmp(line, "Cc:", 3) || + !strncasecmp(line, "X-", 2) || + !strncasecmp(line, "Flags:", 6)) continue; - if (!strncmp(line, "From ", 5)) + if (!strncasecmp(line, "From ", 5)) strcpy(fromdate, (char *) getfromdate(line)); - else if (!strncmp(line, "Date:", 5)) { + else if (!strncasecmp(line, "Date:", 5)) { bp = (struct body *) addbody(bp, line); strcpy(date, (char *) getmaildate(line)); hasdate = 1; } - else if (!strncmp(line, "From:", 5)) { + else if (!strncasecmp(line, "From:", 5)) { bp = (struct body *) addbody(bp, line); getname(line, name, email); } - else if (!strncmp(line, "Message-Id:", 11)) { + else if (!strncasecmp(line, "Message-Id:", 11)) { bp = (struct body *) addbody(bp, line); strcpy(msgid, (char *) getid(line)); } - else if (!strncmp(line, "Subject:", 8)) { + else if (!strncasecmp(line, "Subject:", 8)) { bp = (struct body *) addbody(bp, line); strcpy(subject, (char *) getsubject(line)); hassubject = 1; } - else if (!strncmp(line, "In-Reply-To:", 12)) { + else if (!strncasecmp(line, "In-Reply-To:", 12)) { bp = (struct body *) addbody(bp, line); strcpy(inreply, (char *) getreply(line)); wasinreply = 1;
_at_@ -112,7 +112,7 @@
strcpy(inreply, (char *) getreply(line)); wasinreply = 0; } - else if (!strncmp(line, "To:", 3)) + else if (!strncasecmp(line, "To:", 3)) bp = (struct body *) addbody(bp, line); else if (line[0] == '\n') { bp = (struct body *) addbody(bp, line);
_at_@ -120,7 +120,7 @@
} } else { - if (!strncmp(line, "From ", 5)) { + if (!strncasecmp(line, "From ", 5)) { if (readone) continue; if (strstr(oldline, =============================================================
Versions of the packages hypermail depends on: ii libc6 2.0.7pre3-1 The GNU C library version 2 (run-time files)
-- / Martin Schulze http://home.pages.de/~joey/ / Linux - the choice of a GNU generation joey_at_linux.de /Received on Fri 12 Jun 1998 06:13:17 PM GMT
This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:11 AM GMT GMT