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

From: Daniel Stenberg <>
Date: Fri, 14 Aug 1998 00:07:25 +0200 (MET DST)
Message-ID: <Pine.SOL.3.96.980814000003.21044I-100000_at_hardcore>

On Thu, 13 Aug 1998, David D. Kilzer wrote:

> 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.

The reason for that is a silly bug in the MIME parser I didn't remove until the upcoming b3. Hypermail then assumes that there are header-lines after each boundary-separator. As you just explained, the last one doesn't have any and thus the 'isinheader' variable is set and if the mail ends there it ends in "still in header mode". It shouldn't.

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

Although I cannot swear my newer version will do this perfectly, I don't think *this* problem will occur with it.

> Hmm...well, there are a couple "continue" statements in the while loop,
> so I suppose this check is necessary.

I think the code benefits from that check, yes. It will have importance if you'd pass a broken mail into hypermail. Then of course, passing illegally formatted mails into hypermail could be a big adventure into the world of malfunctions...

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

Yes: nice work!

             Daniel Stenberg -
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Received on Fri 14 Aug 1998 12:21:30 AM GMT

This archive was generated by hypermail 2.2.0 : Thu 22 Feb 2007 07:33:49 PM GMT GMT