1
0
mirror of https://github.com/httpie/cli.git synced 2025-08-10 22:42:05 +02:00

Add --path-as-is

Close #895
This commit is contained in:
Jakub Roztocil
2020-04-13 20:18:01 +02:00
parent 5754e33a75
commit 684a4708d7
4 changed files with 62 additions and 0 deletions

View File

@@ -55,6 +55,25 @@ def test_GET(httpbin_both):
assert HTTP_OK in r
def test_path_dot_normalization():
r = http(
'--offline',
'example.org/../../etc/password',
'param==value'
)
assert 'GET /etc/password?param=value' in r
def test_path_as_is():
r = http(
'--offline',
'--path-as-is',
'example.org/../../etc/password',
'param==value'
)
assert 'GET /../../etc/password?param=value' in r
def test_DELETE(httpbin_both):
r = http('DELETE', httpbin_both + '/delete')
assert HTTP_OK in r