[Python-checkins] python/dist/src/Lib/email Message.py,1.39,1.40

bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Sat Nov 6 01:04:55 CET 2004


Update of /cvsroot/python/python/dist/src/Lib/email
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9058

Modified Files:
	Message.py 
Log Message:
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.


Index: Message.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Message.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- Message.py	3 Oct 2004 03:38:07 -0000	1.39
+++ Message.py	6 Nov 2004 00:04:52 -0000	1.40
@@ -719,7 +719,8 @@
         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'.



More information about the Python-checkins mailing list