Skip to content

Create new Python Bug to Header Parsing Issue #41

Description

@malvidin

In test_headeremail2list_2, it mentions Python bug 27257. However, Bug 27257 appears to be related to empty groups in the header, not issues with obsolete period. With Python 3.7, I do not have any issues with the decoded value, unless the eml_parser should include address groups.

with open(os.path.join(samples_dir, 'sample_bug27257.eml'), 'rb') as fhdl:

From the bug:

To: unlisted-recipients: ;,
""@pop.kundenserver.de (no To-header on input)
The current output below appears to be the expected output.
'to': ['@pop.kundenserver.de']

From the RFC:

To: A Group:Ed Jones c@a.test,joe@where.test,John jdoe@one.test;
Again, the current output below appears to be the expected output.
'to': ['c@a.test', 'joe@where.test', 'jdoe@one.test']

I have not found a related issue in the Python bug tracker, but perhaps something like the following in _header_value_parser.py would be appropriate to prevent the exception:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions