Fix bug in multipart/form-data requests.
In Firefox and Safari, I'm seeing k = " boundary" for multipart/form-data posts. " boundary" != "boundary", so the mime fields aren't parsed. This commit gets rid of the leading space.
This commit is contained in:
parent
b0578819e1
commit
263994e8fc
|
@ -359,7 +359,7 @@ class HTTPConnection(object):
|
|||
elif content_type.startswith("multipart/form-data"):
|
||||
fields = content_type.split(";")
|
||||
for field in fields:
|
||||
k, sep, v = field.partition("=")
|
||||
k, sep, v = field.strip().partition("=")
|
||||
if k == "boundary" and v:
|
||||
self._parse_mime_body(v, data)
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue