Skip to content
This repository was archived by the owner on Nov 5, 2021. It is now read-only.

Improve parsing of MIME parameter part - #1

Open
thomasst wants to merge 2 commits into
upstreamfrom
same-param-encoded-unencoded
Open

Improve parsing of MIME parameter part#1
thomasst wants to merge 2 commits into
upstreamfrom
same-param-encoded-unencoded

Conversation

@thomasst

@thomasst thomasst commented Nov 1, 2019

Copy link
Copy Markdown
Member

Like mailgun#103, but also prevents concatenating splitted and unsplitted params.

stefanw and others added 2 commits November 1, 2019 16:37
Fix problem where single encoded + unencoded MIME parameter
of same name get concatenated.
@thomasst thomasst self-assigned this Nov 1, 2019

@jkemp101 jkemp101 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lgtm but should we delete this fork and re-fork directly from https://github.com/mailgun/flanker? Might make it easier to get this merged upstream after we run it for a bit.

return encodedword.mime_to_unicode(get_value(part))

return ''.join(decode_new_style(p) for p in partition(parts))
elif is_single_part(part):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to noodle through all of this for a bit to understand what it was now doing. We should probably enhance the docstring for this function that includes these two new formats it now supports.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants