Kaydet (Commit) 93d9d5fb authored tarafından Barry Warsaw's avatar Barry Warsaw

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.
üst 932874df
...@@ -719,7 +719,8 @@ class Message: ...@@ -719,7 +719,8 @@ class Message:
boundary = self.get_param('boundary', missing) boundary = self.get_param('boundary', missing)
if boundary is missing: if boundary is missing:
return failobj 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): def set_boundary(self, boundary):
"""Set the boundary parameter in Content-Type to 'boundary'. """Set the boundary parameter in Content-Type to 'boundary'.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment