aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2017-05-05 20:51:59 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2017-05-05 20:51:59 +0800
commitb2ad479d17c435b02fe4f8a02f21bb713c2833f1 (patch)
treed953ea5dd1c1df7da10a5f30900ceea5aa396cf7 /youtube_dl
parent4ac6dc3732492839b8c5e9a144ac8ef8fd1539aa (diff)
[utils] Fix multipart_encode for Python < 3.5
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 25bd228ab..911cacd29 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -2110,7 +2110,7 @@ def try_multipart_encode(data, boundary):
v = v.encode('utf-8')
# RFC 2047 requires non-ASCII field names to be encoded, while RFC 7578
# suggests sending UTF-8 directly. Firefox sends UTF-8, too
- content = b'Content-Disposition: form-data; name="%s"\r\n\r\n' % k + v + b'\r\n'
+ content = b'Content-Disposition: form-data; name="' + k + b'"\r\n\r\n' + v + b'\r\n'
if boundary.encode('ascii') in content:
raise ValueError('Boundary overlaps with data')
out += content