BUG FIX: One-at-a-time MIME messages don't get indexed (src/parse.c)

From: David D. Kilzer <ddkilzer_at_madison.dseg.ti.com_at_hypermail-project.org>
Date: Thu, 13 Aug 1998 13:21:59 -0500
Message-Id: <199808131822.NAA06673_at_elbonia.dseg.ti.com>


I don't recall reading about this, so here goes.

How to Reproduce: Send a single MIME-encoded message to hypermail-2.0b2 where the *last* line of the message is the "boundary" (instead of a blank line).

Result: Attachments will be decoded, but the headers and body of the message never get added to the internal structures using addhash() and addheader(). This results in no NNNN.html file being written and no links on the author/date/subject/thread pages.

Fix: The patch below (after my sig) will fix the problem by checking for
"readone" being set to "true", in addition to "!isinheader".

The Big Picture: Is this check even needed? The "if" statement appears immediately after the huge while() loop that reads and parses all of the messages. [Checking code again.]

Hmm...well, there are a couple "continue" statements in the while loop, so I suppose this check is necessary. The patch is still needed for the case above, though, since the while() loop will exit without doing
"isinheader--" since the last line is a boundary instead of blank.

I still think there might be a better way to handle this. Comments?

Dave

--
David D. Kilzer            \   ``What we hope ever to do with ease,
Software Designer          /      we must learn first to do with 
Raytheon Systems Company   \               diligence.''
ddkilzer_at_ti.com            /              Samuel Johnson


--- hypermail-20b2/src/parse.c.cln	Tue Aug 11 16:50:50 1998
+++ hypermail-20b2/src/parse.c	Thu Aug 13 12:49:11 1998
_at_@ -1349,7 +1349,7 @@
         strcpymax(oldline, line, MAXLINE);
     }
 
-    if (!isinheader) {
+    if (!isinheader || readone) {
         if (!hassubject)
             strcpy(subject, NOSUBJECT);
 
Received on Thu 13 Aug 1998 08:36:03 PM GMT

This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:11 AM GMT GMT