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.

Title: email.Header.decode_header() doesn't work if encoded-word was separeted by CRLF
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 2.7, Python 2.6, Python 2.5
Status: closed Resolution: duplicate
Dependencies: Superseder: decode_header does not follow RFC 2047
View: 1079
Assigned To: Nosy List: barry, ishimoto, tlynn, tony_nelson
Priority: normal Keywords: patch

Created on 2008-12-02 16:15 by ishimoto, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
email.patch ishimoto, 2008-12-02 16:15
Messages (3)
msg76755 - (view) Author: Atsuo Ishimoto (ishimoto) * Date: 2008-12-02 16:15
email.Header.decode_header() doesn't work if encoded-word was separeted
by CRLF. 

For exmaple, decode_header('=?iso-8859-1?q?hello?=\r\n world.') returns
[('=?iso-8859-1?q?hello?=\r\n world.', None)], not [('hello',
'iso-8859-1'), (' world.', None)].

This bug was caused by rev.54371, bug #1582282. I attached a patch to
fix problem and test-case.
msg81071 - (view) Author: Tom Lynn (tlynn) Date: 2009-02-03 17:07
Duplicates issue1079.
msg85367 - (view) Author: Tony Nelson (tony_nelson) Date: 2009-04-04 02:12
See patch in issue1079.  I don't think email.header can require
whitespace until it decodes parsed headers, as whitespace is not always
Date User Action Args
2022-04-11 14:56:42adminsetgithub: 48741
2010-08-04 02:40:54terry.reedysetstatus: open -> closed
2009-12-30 02:32:51r.david.murraysetpriority: normal
resolution: duplicate
superseder: decode_header does not follow RFC 2047
stage: resolved
2009-04-04 02:12:05tony_nelsonsetnosy: + barry, tony_nelson

messages: + msg85367
versions: + Python 2.7
2009-02-03 17:07:46tlynnsetnosy: + tlynn
messages: + msg81071
2008-12-02 16:15:58ishimotocreate