On 1/20/2011 5:34 PM, Martin Gregorie wrote:
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.

Thanks. I'm not sure everyone would agree that it's OK to collapse multiple consecutive spaces into one, but I'm beginning to suspect that those more concerned with preserving as much as possible of the original message are in the minority. It sounds like my take-home distillation from this thread is "yes, the module ignores what the spec says about unfolding, but it doesn't matter." I guess I can live with that.

--
Bob Kline
http://www.rksystems.com
mailto:bkl...@rksystems.com

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to