mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
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.
This commit is contained in:
parent
932874df39
commit
93d9d5fb37
1 changed files with 2 additions and 1 deletions
|
|
@ -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'.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue