You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def format_header_param(name, value):
if not any(ch in value for ch in '"\\\r\n'):
result = '%s="%s"' % (name, value)
try:
result.encode('ascii')
except UnicodeEncodeError:
pass
else:
return result
if not six.PY3: # Python 2:
value = value.encode('utf-8')
value = email.utils.encode_rfc2231(value, 'utf-8')
value = '%s*=%s' % (name, value)
return value
I think this is related code.
When the Content-Type is multipart/form-data,is it correct ues this function to format heaer?
I ues python 2.7.9 and requests 2.5.1
when I do like this:
the request is like this(copy from fiddler):
I think the format of filename is wrong.
the right format should be:
The text was updated successfully, but these errors were encountered: