path fixes

This commit is contained in:
Kenneth Reitz
2012-02-15 02:53:50 -05:00
parent 0b9a2a1581
commit ec109c9ac8
2 changed files with 7 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ test:
nosetests --with-color ./tests/*
lazy:
nosetests --with-color test_requests.py
nosetests --with-color tests/test_requests.py
server:
gunicorn httpbin:app --bind=0.0.0.0:7077 &

View File

@@ -191,7 +191,10 @@ class Request(object):
# Save original response for later.
response.raw = resp
response.url = self.full_url.decode('utf-8')
if isinstance(self.full_url, bytes):
response.url = self.full_url.decode('utf-8')
else:
response.url = self.full_url
return response
@@ -737,7 +740,8 @@ class Response(object):
raise RuntimeError(
'The content for this response was already consumed')
self._content = bytes('').join(self.iter_content()) or None
self._content = bytes().join(self.iter_content()) or None
# print repr(self._content)
except AttributeError:
self._content = None