Message373110
There is a behavior change with my fix. 7bit is returned for Content-Transfer-Encoding before commit and skipping the heuristic if line is empty to avoid ValueError will return quoted-printable for Content-Transfer-Encoding. This is a behavior change even if the ValueError is fixed. I would like to confirm which is the correct behavior and to be documented appropriately.
Test Case in test_contentmanager.py :
def test_set_text_plain_empty_content_heuristics(self):
m = self._make_message()
content = ""
raw_data_manager.set_content(m, content)
self.assertEqual(str(m), textwrap.dedent("""\
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
"""))
self.assertEqual(m.get_payload(decode=True).decode('utf-8'), "\n")
self.assertEqual(m.get_content(), "\n") |
|
Date |
User |
Action |
Args |
2020-07-06 12:32:21 | xtreak | set | recipients:
+ xtreak, barry, doko, r.david.murray, bremner, lukasz.langa, maxking, ivyl |
2020-07-06 12:32:21 | xtreak | set | messageid: <1594038741.82.0.0485125345546.issue41206@roundup.psfhosted.org> |
2020-07-06 12:32:21 | xtreak | link | issue41206 messages |
2020-07-06 12:32:21 | xtreak | create | |
|