summaryrefslogtreecommitdiffstats
path: root/Lib/email/Message.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/email/Message.py')
-rw-r--r--Lib/email/Message.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/email/Message.py b/Lib/email/Message.py
index 977f802..b466f39 100644
--- a/Lib/email/Message.py
+++ b/Lib/email/Message.py
@@ -719,7 +719,8 @@ class Message:
boundary = self.get_param('boundary', missing)
if boundary is missing:
return failobj
- return Utils.collapse_rfc2231_value(boundary).strip()
+ # RFC 2046 says that boundaries may begin but not end in w/s
+ return Utils.collapse_rfc2231_value(boundary).rstrip()
def set_boundary(self, boundary):
"""Set the boundary parameter in Content-Type to 'boundary'.