[erlang-questions] http_uri:encode not quoting control characters
Thu Jun 11 22:14:04 CEST 2015
just figured out that http_uri:encode function doesn't percent-encode
control characters, like this:
RFC3986 (https://www.ietf.org/rfc/rfc3986.txt) states that:
A percent-encoding mechanism is used to represent a data octet in a
component when that octet's corresponding character is outside the
allowed set or is being used as a delimiter of, or within, the
Characters that are allowed in a URI but do not have a reserved
purpose are called unreserved. These include uppercase and lowercase
letters, decimal digits, hyphen, period, underscore, and tilde.
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
So it looks like control characters are not allowed in URI and should be
I wonder why http_uri behaves like this, is it intentional?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions