diff options
author | Barry Warsaw <barry@python.org> | 2004-11-06 00:04:52 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2004-11-06 00:04:52 (GMT) |
commit | 93d9d5fb37cca015444e4579d260eac8eacad96f (patch) | |
tree | 6bf900d47816e55f8f4d777903600501ac28c119 /Lib | |
parent | 932874df396781e7b72dbae351e1c08f563e3fb0 (diff) | |
download | cpython-93d9d5fb37cca015444e4579d260eac8eacad96f.zip cpython-93d9d5fb37cca015444e4579d260eac8eacad96f.tar.gz cpython-93d9d5fb37cca015444e4579d260eac8eacad96f.tar.bz2 |
get_boundary(): Fix for SF bug #1060941. RFC 2046 says boundaries may begin
-- but not end -- with whitespace.
I will backport to Python 2.3.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/email/Message.py | 3 |
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'. |