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 maxking
Recipients barry, maxking, r.david.murray, valhallasw
Date 2019-05-17.17:06:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1558112792.09.0.941974412164.issue21315@roundup.psfhosted.org>
In-reply-to
Content
According to RFC  2047 5(1)

> However, an 'encoded-word' that appears in a
  header field defined as '*text' MUST be separated from any adjacent
  'encoded-word' or 'text' by 'linear-white-space'.

So, it seems like splitting on whitespace is the right thing to do (see MUST).

While your solution works for your case where the charset and cte are utf-8 and q respectively (not a general case for random chatsets and cte), it seems like a hack to get around the fact the header is non-conformant to RFC.

IMO manipulating the original header (value.replace in your patch) isn't something we should do, but @r.david.murray would be the right person to answer how we handle non-conformant messages.
History
Date User Action Args
2019-05-17 17:06:32maxkingsetrecipients: + maxking, barry, r.david.murray, valhallasw
2019-05-17 17:06:32maxkingsetmessageid: <1558112792.09.0.941974412164.issue21315@roundup.psfhosted.org>
2019-05-17 17:06:32maxkinglinkissue21315 messages
2019-05-17 17:06:31maxkingcreate