[Mailman-Developers] Ok, this is weird...
Ron Jarrell
jarrell@vt.edu
Thu, 11 Apr 2002 09:38:54 -0400
At 09:13 AM 4/11/02 -0400, Ron Jarrell wrote:
>I'm guessing that there's something wrong in the way Tagger calls
>Parser in this case... I'll eyeball the code again myself; maybe a
>fresh pair of eyes will catch something you're missing cause you've
>been staring at it too long.
Hah!
This is my morning for epiphanies. I suppose that it helps that this turns out to be very similar to a problem the mirapoint scanners were having this morning, and I already had the brainstorm that figured out their continuation header processing was broken.
You've got a logic flaw. Let me guess, you don't indent much when you write prose, do you :-)?
You allow through lines that start with a whitespace into the new message object that you're building to parse the headers out of, since they're likely a continuation header. But they're likely not a continuation header *in the body of the message*!
Send a message to a list with topics defined. (See my previous note about the bug in topics_enabled - only the
gui uses it, Tagger keys on topics defined.
Indent the first line. Like:
Hi there
You should get the error when Parser hits it before it hits anything else in the new "header".
Tagger.py:96 says:
if line[0] not in ' \t' and line.find(':') < 0:
So any line that starts with a whitespace gets bundled into the test, even if the
*previous* line wasn't a possible header line.
If you want to support continuation lines on pseudo-headers in the body, you either
need to maintain state like Parser does, to decide whether it's really a continuation,
or just an indented line, or just bag that test all together, and only accept lines with
a ":", and not support continuation lines in the pseudo-headers.