blob: 5f1366606971c4e0d32f83f9e6c6b4624e74218d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
URI Normalization function:
- Take care of IDN domains.
- Always provide the URI scheme in lowercase characters.
- Always provide the host, if any, in lowercase characters.
- Only perform percent-encoding where it is essential.
- Always use uppercase A-through-F characters when percent-encoding.
- Prevent dot-segments appearing in non-relative URI paths.
- For schemes that define a default authority, use an empty authority if the
default is desired.
- For schemes that define an empty path to be equivalent to a path of "/", use
"/".
- For schemes that define a port, use an empty port if the default is desired
- All portions of the URI must be utf-8 encoded NFC from Unicode strings
|