Permalink
Browse files

Merge pull request #168 from Lukasa/content_type

Content-Type header values should be native strings.
  • Loading branch information...
2 parents b08c501 + d75a807 commit 82cee121ed5cf5217063ff5618905e234160727e @shazow committed Apr 2, 2013
Showing with 5 additions and 5 deletions.
  1. +4 −4 test/test_filepost.py
  2. +1 −1 urllib3/filepost.py
View
@@ -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
@@ -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

0 comments on commit 82cee12

Please sign in to comment.