Skip to content
Myr

Added test case for Issue #369.

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

Tests that legal reserved and unreserved characters in the path are not percent-encoded. Currently fails.

authored by Matt Giuca · committed by Matt Giuca · parent cf54f60 · Browse files · 1 file+14 added−0 removed
This commit

State

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

Diff stats

1 file+14 added−0 removed

  • other:+14 added−0 removed

1 file+14 added−0 removed

modified:test_requests.py+14 added
136 unmodified lines
137 url = httpbin('get/' + path)138 response = get(url)139 self.assertEqual(response.url, httpbin('get/' + path_fully_escaped))140141 # Test that reserved characters in a path do not get percent-escaped142 # Tests:143 # - All reserved characters (RFC 3986), except '?', '#', '[' and ']',144 # which are not allowed in the path, and ';' which delimits145 # parameters.146 # All such characters must be allowed bare in path, and must not be147 # encoded.148 # - Special unreserved characters (RFC 3986), which should not be149 # encoded (even though it wouldn't hurt).150 path_reserved = '!$&\'()*+,/:=@-._~'151 url = httpbin('get/' + path_reserved)152 response = get(url)153 self.assertEqual(response.url, httpbin('get/' + path_reserved))154155156 def test_user_agent_transfers(self):157 """Issue XX"""158159 heads = {
613 unmodified lines