procmail
[Top] [All Lists]

Re: 3.11pre4 regexp bug?

1999-06-03 19:14:33
Philip wrote: 
Rik Kabel <rik(_at_)netcom(_dot_)com> writes:
I am puzzled. The following conditions, which I thought were
equivalent, give different results. Here is the test harness and
output. The input file contains a header line with a single
space in it.

No, it contains a header that is continued onto the next line, albeit
with no actual data on the second line.  As far as procmail's regexp
engine is concerned, that space is the last character of the
Content-Type: header field's value.

Sigh. I knew that. Actually, I (mistakenly) thought that continued headers
had to be continued with a tab (and I should have written
 * ^[ ][        ]*$
as well). Rereading 822, it clearly says SPACE or HTAB for continuation.

Leading dollarsigns cause procmail to perform variable and command
expansion on a condition, so those last two conditions end up being
interpreted as the regexps "[   ]+^" and "[     ]+$", respectively.

My son will probably read this as well, and suggest that I consider
earlier retirement. I can only plead exhaustion of various faculties. Who
put decaf in the machine? This is what comes of being so sure that you are
onto something that you don't step back to check it all carefully.

Thanks for the quick, kind reply.

-- 
Rik Kabel          Old enough to be an adult              
rik(_at_)netcom(_dot_)com

<Prev in Thread] Current Thread [Next in Thread>