summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAbhilash Raj <maxking@users.noreply.github.com>2019-06-04 17:41:34 (GMT)
committerBarry Warsaw <barry@python.org>2019-06-04 17:41:34 (GMT)
commit46d88a113142b26c01c95c93846a89318ba87ffc (patch)
tree756e002f21f3fa01483b309ddf85b0ed37e2e19d /Doc
parentbc6469f79ca13217b784fb47da7ec83484a3debe (diff)
downloadcpython-46d88a113142b26c01c95c93846a89318ba87ffc.zip
cpython-46d88a113142b26c01c95c93846a89318ba87ffc.tar.gz
cpython-46d88a113142b26c01c95c93846a89318ba87ffc.tar.bz2
bpo-35805: Add parser for Message-ID email header. (GH-13397)
* bpo-35805: Add parser for Message-ID header. This parser is based on the definition of Identification Fields from RFC 5322 Sec 3.6.4. This should also prevent folding of Message-ID header using RFC 2047 encoded words and hence fix bpo-35805. * Prevent folding of non-ascii message-id headers. * Add fold method to MsgID token to prevent folding.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/email.headerregistry.rst33
1 files changed, 20 insertions, 13 deletions
diff --git a/Doc/library/email.headerregistry.rst b/Doc/library/email.headerregistry.rst
index c3ce90c..9376da2 100644
--- a/Doc/library/email.headerregistry.rst
+++ b/Doc/library/email.headerregistry.rst
@@ -321,19 +321,26 @@ variant, :attr:`~.BaseHeader.max_count` is set to 1.
The default mappings are:
- :subject: UniqueUnstructuredHeader
- :date: UniqueDateHeader
- :resent-date: DateHeader
- :orig-date: UniqueDateHeader
- :sender: UniqueSingleAddressHeader
- :resent-sender: SingleAddressHeader
- :to: UniqueAddressHeader
- :resent-to: AddressHeader
- :cc: UniqueAddressHeader
- :resent-cc: AddressHeader
- :from: UniqueAddressHeader
- :resent-from: AddressHeader
- :reply-to: UniqueAddressHeader
+ :subject: UniqueUnstructuredHeader
+ :date: UniqueDateHeader
+ :resent-date: DateHeader
+ :orig-date: UniqueDateHeader
+ :sender: UniqueSingleAddressHeader
+ :resent-sender: SingleAddressHeader
+ :to: UniqueAddressHeader
+ :resent-to: AddressHeader
+ :cc: UniqueAddressHeader
+ :resent-cc: AddressHeader
+ :bcc: UniqueAddressHeader
+ :resent-bcc: AddressHeader
+ :from: UniqueAddressHeader
+ :resent-from: AddressHeader
+ :reply-to: UniqueAddressHeader
+ :mime-version: MIMEVersionHeader
+ :content-type: ContentTypeHeader
+ :content-disposition: ContentDispositionHeader
+ :content-transfer-encoding: ContentTransferEncodingHeader
+ :message-id: MessageIDHeader
``HeaderRegistry`` has the following methods: