mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Added test case for Issue #369.
Tests that legal reserved and unreserved characters in the path are not percent-encoded. Currently fails.
This commit is contained in:
@@ -138,6 +138,20 @@ class RequestsTestSuite(TestSetup, unittest.TestCase):
|
||||
response = get(url)
|
||||
self.assertEqual(response.url, httpbin('get/' + path_fully_escaped))
|
||||
|
||||
# Test that reserved characters in a path do not get percent-escaped
|
||||
# Tests:
|
||||
# - All reserved characters (RFC 3986), except '?', '#', '[' and ']',
|
||||
# which are not allowed in the path, and ';' which delimits
|
||||
# parameters.
|
||||
# All such characters must be allowed bare in path, and must not be
|
||||
# encoded.
|
||||
# - Special unreserved characters (RFC 3986), which should not be
|
||||
# encoded (even though it wouldn't hurt).
|
||||
path_reserved = '!$&\'()*+,/:=@-._~'
|
||||
url = httpbin('get/' + path_reserved)
|
||||
response = get(url)
|
||||
self.assertEqual(response.url, httpbin('get/' + path_reserved))
|
||||
|
||||
|
||||
def test_user_agent_transfers(self):
|
||||
"""Issue XX"""
|
||||
|
||||
Reference in New Issue
Block a user