Skip to content

Commit 44985a4

Browse files
Update Misc/NEWS.d/next/Library/2024-12-11-17-44-36.gh-issue-127794.VwmRsp.rst
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent d6549a0 commit 44985a4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
The :meth:`email.message.Message.add_header` method now validates header
2-
field names according to :rfc:`5322` when headers are added via add_header
3-
or __setitem__ and raises a ValueError if they contain invalid characters.
2+
field names according to :rfc:`5322` and raises a :exc:`ValueError` if
3+
they contain invalid characters. A similar argument applies if headers
4+
are added through :meth:`Message.__setitem__ <object.__setitem__>`.

0 commit comments

Comments
 (0)