Closed f76e6224-bf87-486c-9d7b-4352d21c7be7 closed 14 years ago
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 bpo-1582282. I attached a patch to fix problem and test-case.
Duplicates bpo-1079.
See patch in bpo-1079. I don't think email.header can require whitespace until it decodes parsed headers, as whitespace is not always required.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields: ```python assignee = None closed_at =
created_at =
labels = ['type-bug', 'library']
title = "email.Header.decode_header() doesn't work if encoded-word was separeted by CRLF"
updated_at =
user = 'https://github.com/atsuoishimoto'
```
bugs.python.org fields:
```python
activity =
actor = 'terry.reedy'
assignee = 'none'
closed = True
closed_date =
closer = 'terry.reedy'
components = ['Library (Lib)']
creation =
creator = 'ishimoto'
dependencies = []
files = ['12196']
hgrepos = []
issue_num = 4491
keywords = ['patch']
message_count = 3.0
messages = ['76755', '81071', '85367']
nosy_count = 4.0
nosy_names = ['barry', 'ishimoto', 'tlynn', 'tony_nelson']
pr_nums = []
priority = 'normal'
resolution = 'duplicate'
stage = 'resolved'
status = 'closed'
superseder = '1079'
type = 'behavior'
url = 'https://bugs.python.org/issue4491'
versions = ['Python 2.6', 'Python 2.5', 'Python 2.7']
```