summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2000-09-25 15:08:27 (GMT)
committerBarry Warsaw <barry@python.org>2000-09-25 15:08:27 (GMT)
commit2ea2b1133eb9676454bc680450bf121e1493f7a4 (patch)
tree3f0e23d48af4ca68dfec2cd3b060bb5bdb524337
parentee76f0b2930414ff697cb5cf00aab263ad1adf20 (diff)
downloadcpython-2ea2b1133eb9676454bc680450bf121e1493f7a4.zip
cpython-2ea2b1133eb9676454bc680450bf121e1493f7a4.tar.gz
cpython-2ea2b1133eb9676454bc680450bf121e1493f7a4.tar.bz2
AddrlistClass.getdomainliteral(): rfc822 requires that the domain
literal be wrapped in square brackets. This fix replaces the square brackets that were previously being stripped off. Closes SF bug #110621.
-rw-r--r--Lib/rfc822.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py
index 42aac1c..2004524 100644
--- a/Lib/rfc822.py
+++ b/Lib/rfc822.py
@@ -703,7 +703,7 @@ class AddrlistClass:
def getdomainliteral(self):
"""Parse an RFC-822 domain-literal."""
- return self.getdelimited('[', ']\r', 0)
+ return '[%s]' % self.getdelimited('[', ']\r', 0)
def getatom(self):
"""Parse an RFC-822 atom."""