Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #168 from Lukasa/content_type

Content-Type header values should be native strings.
  • Loading branch information...
commit 82cee121ed5cf5217063ff5618905e234160727e 2 parents b08c501 + d75a807
@shazow authored
Showing with 5 additions and 5 deletions.
  1. +4 −4 test/test_filepost.py
  2. +1 −1  urllib3/filepost.py
View
8 test/test_filepost.py
@@ -62,7 +62,7 @@ def test_field_encoding(self):
, fields)
self.assertEqual(content_type,
- b'multipart/form-data; boundary=' + b(BOUNDARY))
+ 'multipart/form-data; boundary=' + str(BOUNDARY))
def test_filename(self):
@@ -80,7 +80,7 @@ def test_filename(self):
)
self.assertEqual(content_type,
- b'multipart/form-data; boundary=' + b(BOUNDARY))
+ 'multipart/form-data; boundary=' + str(BOUNDARY))
def test_textplain(self):
@@ -98,7 +98,7 @@ def test_textplain(self):
)
self.assertEqual(content_type,
- b'multipart/form-data; boundary=' + b(BOUNDARY))
+ 'multipart/form-data; boundary=' + str(BOUNDARY))
def test_explicit(self):
@@ -116,4 +116,4 @@ def test_explicit(self):
)
self.assertEqual(content_type,
- b'multipart/form-data; boundary=' + b(BOUNDARY))
+ 'multipart/form-data; boundary=' + str(BOUNDARY))
View
2  urllib3/filepost.py
@@ -93,6 +93,6 @@ def encode_multipart_formdata(fields, boundary=None):
body.write(b('--%s--\r\n' % (boundary)))
- content_type = b('multipart/form-data; boundary=%s' % boundary)
+ content_type = str('multipart/form-data; boundary=%s' % boundary)
return body.getvalue(), content_type
Please sign in to comment.
Something went wrong with that request. Please try again.