From 770976a66e95eb67a308e1a2f10a95d709079cab Mon Sep 17 00:00:00 2001 From: Jakub Roztocil Date: Thu, 16 Apr 2020 11:29:58 +0200 Subject: [PATCH] Add `--path-as-is` docs --- README.rst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.rst b/README.rst index 02e407ce..5fbbdef1 100644 --- a/README.rst +++ b/README.rst @@ -380,6 +380,34 @@ Example for the `httpie-unixsocket # Now the scheme can be omitted $ http-unix %2Fvar%2Frun%2Fdocker.sock/info + +``--path-as-is`` +---------------- + +The standard behaviour of HTTP clients is to normalize the path portion of URLs by squashing dot segments +as a typically filesystem would: + + +.. code-block:: bash + + $ http -v example.org/./../../etc/password + +.. code-block:: http + + GET /etc/password HTTP/1.1 + + +The ``--path-as-is`` option allows you to disable this behavior: + +.. code-block:: bash + + $ http --path-as-is -v example.org/./../../etc/password + +.. code-block:: http + + GET /../../etc/password HTTP/1.1 + + Request items =============