[Python-checkins] python/dist/src/Lib/email Message.py, 1.32.10.5, 1.32.10.6

bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Sat Nov 6 01:14:07 CET 2004


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

Modified Files:
      Tag: release23-maint
	Message.py 
Log Message:
get_boundary(): Fix for SF bug #1060941.  RFC 2046 says boundaries may begin
-- but not end -- with whitespace.


Index: Message.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Message.py,v
retrieving revision 1.32.10.5
retrieving revision 1.32.10.6
diff -u -d -r1.32.10.5 -r1.32.10.6
--- Message.py	28 Sep 2004 04:55:34 -0000	1.32.10.5
+++ Message.py	6 Nov 2004 00:14:05 -0000	1.32.10.6
@@ -747,7 +747,8 @@
             # RFC 2231 encoded, so decode.  It better end up as ascii
             charset = boundary[0] or 'us-ascii'
             return unicode(boundary[2], charset).encode('us-ascii')
-        return _unquotevalue(boundary.strip())
+        # RFC 2046 says that boundaries may begin but not end in w/s
+        return _unquotevalue(boundary.rstrip())
 
     def set_boundary(self, boundary):
         """Set the boundary parameter in Content-Type to 'boundary'.



More information about the Python-checkins mailing list