On Thu, 20 Jan 2011 16:25:52 -0500, Bob Kline wrote: > On 1/20/2011 3:48 PM, Martin Gregorie wrote: >> That's only a problem if your code cares about the composition of the >> whitespace and this, IMO is incorrect behaviour. When the separator >> between syntactic elements in a header is 'whitespace' it should not >> matter what combination of newlines, tabs and spaces make up the >> whitespace element. > > That would be true for what the RFC calls "structured" fields, but not > for the others (such as the Subject header).
Subject text comparisons should work correctly if you were to split the subject text using the 'whitespace' definition and then reassemble it using a single space in place of each whitespace separator. Its either that or assuming that all MUAs use the same line length and all use a line split of "CRLF " - the whitespace that's needed to align the continuation with the test on the first subject line. Many MUAs will do that, but its unlikely that all will. -- martin@ | Martin Gregorie gregorie. | Essex, UK org | -- http://mail.python.org/mailman/listinfo/python-list