diff options
author | Péter Dimitrov <peterdmv@users.noreply.github.com> | 2020-05-28 08:54:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-28 08:54:02 +0200 |
commit | 7995da101cb33d0ba2a44aa25a86624435057886 (patch) | |
tree | 70a57b79c5dc94a01c228e4a165164f0e157eb77 /lib/inets | |
parent | 1d7e5a8b14ba5a269402a1e2186f5c279cd0b2e9 (diff) | |
parent | 6903bf44222f8c9d13a744e450b26649eee26362 (diff) | |
download | erlang-7995da101cb33d0ba2a44aa25a86624435057886.tar.gz |
Merge pull request #2629 from peterdmv/inets/http-client/ERL-1215/OTP-16650
httpc: clarify the handling of the percent ("%") character in URIs
Diffstat (limited to 'lib/inets')
-rw-r--r-- | lib/inets/doc/src/httpc.xml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/inets/doc/src/httpc.xml b/lib/inets/doc/src/httpc.xml index 2c705a47b5..42a6a5b43d 100644 --- a/lib/inets/doc/src/httpc.xml +++ b/lib/inets/doc/src/httpc.xml @@ -91,8 +91,16 @@ </item> </taglist> <p><c>url() = string()</c> syntax according to the URI definition in - <url href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</url>, + <url href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</url>, for example <c>"http://www.erlang.org"</c></p> + <warning><p>Please note that httpc normalizes input URIs before internal processing + and special care shall be taken when the URI has percent ("%") characters. A percent + serves as the indicator for percent-encoded octets and it must be percent-encoded + as "%25" for that octet to be used as data within the URI.</p> + <p>For example, in order to send an HTTP GET request with the URI + <c>http://localhost/foo%25bar</c>, the percent character must be percent-encoded when + creating the request: <c>httpc:request("http://localhost/foo%2525bar").</c> + </p></warning> <p><c>status_line() = {http_version(), status_code(), reason_phrase()}</c></p> <p><c>http_version() = string()</c>, for example, <c>"HTTP/1.1"</c></p> <p><c>status_code() = integer()</c></p> |