Skip to content

Commit ec109c9

Browse files
author
Kenneth Reitz
committed
path fixes
1 parent 0b9a2a1 commit ec109c9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test:
88
nosetests --with-color ./tests/*
99

1010
lazy:
11-
nosetests --with-color test_requests.py
11+
nosetests --with-color tests/test_requests.py
1212

1313
server:
1414
gunicorn httpbin:app --bind=0.0.0.0:7077 &

requests/models.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,10 @@ def build(resp):
191191

192192
# Save original response for later.
193193
response.raw = resp
194-
response.url = self.full_url.decode('utf-8')
194+
if isinstance(self.full_url, bytes):
195+
response.url = self.full_url.decode('utf-8')
196+
else:
197+
response.url = self.full_url
195198

196199
return response
197200

@@ -737,7 +740,8 @@ def content(self):
737740
raise RuntimeError(
738741
'The content for this response was already consumed')
739742

740-
self._content = bytes('').join(self.iter_content()) or None
743+
self._content = bytes().join(self.iter_content()) or None
744+
# print repr(self._content)
741745
except AttributeError:
742746
self._content = None
743747

0 commit comments

Comments
 (0)