diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2021-11-06 14:27:46 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2021-11-06 14:27:46 +0000 |
commit | c8032a645b499d4e5856bc996dd74d6f2298b997 (patch) | |
tree | 34b89666d4a1fb1ce3ccfb5631624c0dd0613c1b /usr.sbin | |
parent | 8536bd8daee944e2a5861d0e14c418090384e2a7 (diff) |
Stop URL encoding the tilde character
RFC 1738 Uniform Resource Locators (URL) lists tilde as unsafe character.
RFC 2396 Uniform Resource Identifiers (URI): Generic Syntax updates it to
The tilde "~" character was added to those in the "unreserved" set,
since it is extensively used on the Internet in spite of the
difficulty to transcribe it with some keyboards.
In theory, this shouldn't make a difference, but some servers do not decode
"%7e" and thus erroneously serve a 404.
RFC 2396 2.4.2. When to Escape and Unescape says:
In some cases, data that could be represented by an unreserved
character may appear escaped; for example, some of the unreserved
"mark" characters are automatically escaped by some systems. If the
given URI scheme defines a canonicalization algorithm, then
unreserved characters may be unescaped according to that algorithm.
For example, "%7e" is sometimes used instead of "~" in an http URL
path, but the two are equivalent for an http URL.
Update ftp(1) to RFC 2396 by no longer treating "~" as unsafe character.
This is effectively a one-character diff; update comments accordingly as
well as the order of characters to ease code-to-standard comparison.
This matches curl(1) and wget(1) behaviour wrt. encoding of "~".
OK sthen
Diffstat (limited to 'usr.sbin')
0 files changed, 0 insertions, 0 deletions