summaryrefslogtreecommitdiff
path: root/requests
diff options
context:
space:
mode:
authorKenneth Reitz <me@kennethreitz.org>2018-03-12 11:45:29 -0400
committerKenneth Reitz <me@kennethreitz.org>2018-03-12 11:45:29 -0400
commit4e76e142d11229a4511086e09cefb33adab28325 (patch)
treeb42196d1f091bf50eb366c24cc7bae93fc531aec /requests
parentd207c345968857d488ed573b56b8ea20cc0d41de (diff)
downloadpython-requests-threedotoh.tar.gz
working on itthreedotoh
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
Diffstat (limited to 'requests')
-rw-r--r--requests/compat.py2
-rw-r--r--requests/models.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/requests/compat.py b/requests/compat.py
index 67b19e10..94039379 100644
--- a/requests/compat.py
+++ b/requests/compat.py
@@ -11,3 +11,5 @@ Python 3.
basestring = (str, bytes)
numeric_types = (int, float)
integer_types = (int,)
+bytes = bytes
+str = str \ No newline at end of file
diff --git a/requests/models.py b/requests/models.py
index bc6e9ade..a749e11c 100644
--- a/requests/models.py
+++ b/requests/models.py
@@ -503,7 +503,7 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
length = super_len(body)
if length:
- self.headers['Content-Length'] = builtin_str(length)
+ self.headers['Content-Length'] = str(length)
elif is_stream(body):
self.headers['Transfer-Encoding'] = 'chunked'
else: