mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #1116 from Lukasa/master
Correct type of Content-Length headers.
This commit is contained in:
+1
-1
@@ -346,7 +346,7 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
|
||||
])
|
||||
|
||||
try:
|
||||
length = super_len(data)
|
||||
length = str(super_len(data))
|
||||
except (TypeError, AttributeError):
|
||||
length = False
|
||||
|
||||
|
||||
+6
-2
@@ -9,6 +9,12 @@ import unittest
|
||||
|
||||
import requests
|
||||
from requests.auth import HTTPDigestAuth
|
||||
from requests.compat import str
|
||||
|
||||
try:
|
||||
import StringIO
|
||||
except ImportError:
|
||||
import io as StringIO
|
||||
|
||||
HTTPBIN = os.environ.get('HTTPBIN_URL', 'http://httpbin.org/')
|
||||
|
||||
@@ -131,8 +137,6 @@ class RequestsTestCase(unittest.TestCase):
|
||||
self.assertEqual(r.status_code, 200)
|
||||
|
||||
def test_BASICAUTH_TUPLE_HTTP_200_OK_GET(self):
|
||||
|
||||
|
||||
auth = ('user', 'pass')
|
||||
url = httpbin('basic-auth', 'user', 'pass')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user