[issue27256] header indentation destroyed

2016-06-08 Thread R. David Murray

R. David Murray added the comment:

Hmm.  There appear to be at least two bugs here, using the SMTP policy.  I 
thought I had test cases like this, but clearly I don't :(

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27256] header indentation destroyed

2016-06-07 Thread Hans-Peter Jansen

Changes by Hans-Peter Jansen :


Added file: http://bugs.python.org/file43286/mf.9__mi0bf.out

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27256] header indentation destroyed

2016-06-07 Thread Hans-Peter Jansen

New submission from Hans-Peter Jansen:

In the course of replacing an old Python 2.7 email filter tool with a rewritten 
Python3 version, I stumbled across a ugly case, where such an header:

X-Microsoft-Exchange-Diagnostics: 
=?utf-8?B?MTtCTDJQUjAyTUI1MTQ7MjM6bEtRRlNaUHQvVTk5WCttdktlOUVrUGQvVFBH?=
 =?utf-8?B?cDFJemVUeXFzOGNzYnZOYWlwMDZpR0YzbXZyY09WaTBKM2pkeUl4S1VDMkxw?=
 =?utf-8?B?eVRkNWthRW9waUhJTzczTWd5WDZOQ3hMNU1haGFvQTVzVTdRZmxJUnZlblpW?=
 ...

is regenerated as:

X-Microsoft-Exchange-Diagnostics:
 1;BL2PR02MB514;23:lKQFSZPt/U99X+mvKe9EkPd/TPG
p1IzeTyqs8csbvNaip06iGF3mvrcOVi0J3jdyIxKUC2Lp
yTd5kaEopiHIO73MgyX6NCxL5MahaoA5sU7QflIRvenZV

which is plain wrong of course.

I'm using email.message_from_binary_file for parsing and BytesGenerator.flatten 
for regeneration. Since those are LKML public mails, I'm attaching both 
versions.

I'm using 3.4.4, but also the email module from current hg for testing.

--
components: email
files: utf8-header-failure.mail
messages: 267732
nosy: barry, frispete, r.david.murray
priority: normal
severity: normal
status: open
title: header indentation destroyed
versions: Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43285/utf8-header-failure.mail

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com