Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-100991: fix email headerReferences andIn-Reply-To being treated as unstructured#128603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
RanKKI wants to merge3 commits intopython:main
base:main
Choose a base branch
Loading
fromRanKKI:fix/issue-100991

Conversation

RanKKI
Copy link
Contributor

@RanKKIRanKKI commentedJan 8, 2025
edited by bedevere-appbot
Loading

According toRFC 5322#3.6.4, bothReferences andIn-Reply-To are not unstructured fields and should have similar behaviour toMessage-ID.

message-id      =   "Message-ID:" msg-id CRLFin-reply-to     =   "In-Reply-To:" 1*msg-id CRLFreferences      =   "References:" 1*msg-id CRLF

Sample Code

msg=textwrap.dedent(f"""\            Message-ID: <long-but-perfectly-valid-message-id-that-does-not-end-up-qp-encoded@example.com>            In-Reply-To: <reference-to-long-but-perfectly-valid-message-id-that-gets-qp-encoded@example.com>            References: <reference-to-long-but-perfectly-valid-message-id-that-gets-qp-encoded@example.com> <reference-to-long-but-perfectly-valid-message-id-that-gets-qp-encoded@example.com>            """)msg=email.message_from_string(msg,policy=email.policy.default)

Before this patch

Message-ID:<long-but-perfectly-valid-message-id-that-does-not-end-up-qp-encoded@example.com>In-Reply-To:=?utf-8?q?=3Creference-to-long-but-perfectly-valid-message-id-t?==?utf-8?q?hat-gets-qp-encoded=40example=2Ecom=3E?=References:=?utf-8?q?=3Creference-to-long-but-perfectly-valid-message-id-th?==?utf-8?q?at-gets-qp-encoded=40example=2Ecom=3E_=3Creference-to-long-but-pe?==?utf-8?q?rfectly-valid-message-id-that-gets-qp-encoded=40example=2Ecom=3E?=

After this patch

Message-ID:<long-but-perfectly-valid-message-id-that-does-not-end-up-qp-encoded@example.com>In-Reply-To:<reference-to-long-but-perfectly-valid-message-id-that-gets-qp-encoded@example.com>References:<reference-to-long-but-perfectly-valid-message-id-that-gets-qp-encoded@example.com><reference-to-long-but-perfectly-valid-message-id-that-gets-qp-encoded@example.com>

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@RanKKI@ZeroIntensity

[8]ページ先頭

©2009-2025 Movatter.jp