Message68630
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? |
|
Date |
User |
Action |
Args |
2008-06-23 14:45:34 | aalbrecht | set | spambayes_score: 1.76784e-07 -> 1.7678366e-07 recipients:
+ aalbrecht, barry, cjw296, splorgdar |
2008-06-23 14:45:34 | aalbrecht | set | spambayes_score: 1.76784e-07 -> 1.76784e-07 messageid: <1214232334.31.0.177774146664.issue1974@psf.upfronthosting.co.za> |
2008-06-23 14:45:33 | aalbrecht | link | issue1974 messages |
2008-06-23 14:45:32 | aalbrecht | create | |
|