-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Equivalent of path-as-is option in curl #895
Comments
The dot segment removal is automatically applied by the upstream Currently, neither library provides a way to disable the normalisation, sadly. urllib3==1.25.8 $ http --offline example.org/foo/../bar/ GET /bar/ HTTP/1.1 |
Good to know. In the meantime, one can partially workaround this by manually URL-encoding |
Actually, this was already requested for the The issue contains a solution approved by a maintainer. |
@exploide the linked issue includes a comment with a decent workaround, so I’ve just pushed support for $ http --path-as-is --offline example.org/../../etc/password GET /../../etc/password HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: example.org
User-Agent: HTTPie/2.1.0-dev |
Awesome. That was fast. Thanks! 👍 |
In
curl
there is the--path-as-is
option:Currently, httpie does not send paths like
/../../../../../
to the server but resolves and removes them locally.Sending such sequences can be useful during security testing, e.g. checking directory traversal vulnerabilities.
I would like to request a similar option as
curl
's--path-as-is
.The text was updated successfully, but these errors were encountered: