Skip to content
Myr

default encode_uri to True

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

authored by Kenneth Reitz · committed by Kenneth Reitz · parent abca7f0 · Browse files · 2 files+2 added−2 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+2 added−2 removed

  • tests:+1 added−1 removed
  • other:+1 added−1 removed

2 files+2 added−2 removed

modified:requests/models.py+1 added-1 removed
341 unmodified lines
342 url = '%s&%s' % (url, self._enc_params)343 else:344 url = '%s?%s' % (url, self._enc_params)345346 if self.config.get('encode_uri'):346 if self.config.get('encode_uri', True):347 url = requote_uri(url)348349 return url350
448 unmodified lines
modified:tests/test_requests.py+1 added-1 removed
72 unmodified lines
7374 def test_path_is_not_double_encoded(self):75 request = requests.Request("http://0.0.0.0/get/test case")7677 assert request.path_url == "/get/test%20case"77 self.assertEqual(request.path_url, "/get/test%20case")7879 def test_HTTP_200_OK_GET(self):80 r = get(httpbin('/get'))81 self.assertEqual(r.status_code, 200)
722 unmodified lines