projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
932874d
)
get_boundary(): Fix for SF bug #1060941. RFC 2046 says boundaries may begin
author
Barry Warsaw
<barry@python.org>
Sat, 6 Nov 2004 00:04:52 +0000
(
00:04
+0000)
committer
Barry Warsaw
<barry@python.org>
Sat, 6 Nov 2004 00:04:52 +0000
(
00:04
+0000)
-- but not end -- with whitespace.
I will backport to Python 2.3.
Lib/email/Message.py
patch
|
blob
|
history
diff --git
a/Lib/email/Message.py
b/Lib/email/Message.py
index 977f802305b8771da8c9381dbcaaccb892b759a0..b466f396d92a03ae380e62a6371447cf425c59b9 100644
(file)
--- 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'.