Skip to content
Myr

Merge pull request #368 from jgorset/unicode-response-url

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Decode response URL to a unicode string.

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 61a0e85, b37fbf3 · Browse files · 2 files+11 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+11 added−1 removed

  • other:+11 added−1 removed

2 files+11 added−1 removed

modified:requests/models.py+1 added-1 removed
185 unmodified lines
186187 if is_error:188 response.error = resp189190 response.url = self.full_url190 response.url = self.full_url.decode('utf-8')191192 return response193194 history = []
554 unmodified lines
modified:test_requests.py+10 added
292 unmodified lines
293294 r = requests.get(httpbin('gzip'))295 r.content.decode('ascii')296297 def test_response_has_unicode_url(self):298299 for service in SERVICES:300301 url = service('get')302303 response = requests.get(url)304305 self.assertIsInstance(response.url, unicode)306307308 def test_unicode_get(self):309310 for service in SERVICES:311
357 unmodified lines