diff options
Diffstat (limited to 'requests')
| -rw-r--r-- | requests/compat.py | 2 | ||||
| -rw-r--r-- | requests/models.py | 2 |
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: |
