This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author aalbrecht
Recipients aalbrecht, barry, cjw296, splorgdar
Date 2008-06-23.14:45:32
SpamBayes Score 1.7678366e-07
Marked as misclassified No
Message-id <1214232334.31.0.177774146664.issue1974@psf.upfronthosting.co.za>
In-reply-to
Content
IMO, the best way to resolve this is to use the default continuation
whitespace when a Header class is created from a string. But I'm pretty
unsure about the default whitespace character. After having a look at a
random set of mails in my inbox it seems that in most cases a tab is
used for all headers except for the subject (excluding mails sent from
Python scripts of course...). I would prefer '\t'; it's allowed and
results in a cleaner output - but it won't solve the problem with some
email clients which was the starting point for this issue (a short note
in the docs should resolve this anyway... ;-)

But I wonder if for some reason setting headers from strings
intentionally differs from using the Header class? There are some tests
that explicitly test both cases and expect different output. In
TestLongHeaders it's

 test_long_unbreakable_lines_with_continuation()
 test_long_lines_with_different_header(self)
 test_long_received_header() [continuation_ws set to tab here]

So, what I would do is
 * remove continuation_ws keyword from Generator._write_headers()
 * make '\t' the default cont. whitespace for headers (Header class)
 * update test cases and the documentation accordingly

Do you think that this is the right way to go? Or would it break too
much code outside stdlib if the default ws changes?
History
Date User Action Args
2008-06-23 14:45:34aalbrechtsetspambayes_score: 1.76784e-07 -> 1.7678366e-07
recipients: + aalbrecht, barry, cjw296, splorgdar
2008-06-23 14:45:34aalbrechtsetspambayes_score: 1.76784e-07 -> 1.76784e-07
messageid: <1214232334.31.0.177774146664.issue1974@psf.upfronthosting.co.za>
2008-06-23 14:45:33aalbrechtlinkissue1974 messages
2008-06-23 14:45:32aalbrechtcreate