mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
default encode_uri to True
This commit is contained in:
+1
-1
@@ -343,7 +343,7 @@ class Request(object):
|
||||
else:
|
||||
url = '%s?%s' % (url, self._enc_params)
|
||||
|
||||
if self.config.get('encode_uri'):
|
||||
if self.config.get('encode_uri', True):
|
||||
url = requote_uri(url)
|
||||
|
||||
return url
|
||||
|
||||
@@ -74,7 +74,7 @@ class RequestsTestSuite(TestSetup, unittest.TestCase):
|
||||
def test_path_is_not_double_encoded(self):
|
||||
request = requests.Request("http://0.0.0.0/get/test case")
|
||||
|
||||
assert request.path_url == "/get/test%20case"
|
||||
self.assertEqual(request.path_url, "/get/test%20case")
|
||||
|
||||
def test_HTTP_200_OK_GET(self):
|
||||
r = get(httpbin('/get'))
|
||||
|
||||
Reference in New Issue
Block a user