mirror of
https://github.com/python/cpython.git
synced 2024-11-29 04:44:13 +08:00
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.
This commit is contained in:
parent
ee76f0b293
commit
2ea2b1133e
@ -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."""
|
||||
|
Loading…
Reference in New Issue
Block a user