01 / LANGUAGE

Rust

  • In HTTP(S) URLs, Rust treats \ as a valid delimiter between the scheme and host, or the host and path, and normalizes it to /.
  • Rust normalizes fullwidth Unicode characters to their simpler forms. For example, (full-width dot) is converted to .(normal dot). This does not apply to URL delimiters: a full-width slash () is not treated as a valid URL delimiter.
  • Rust converts many integer-form hosts to dotted IPv4: http://127.1127.0.0.1, http://2130706433127.0.0.1, http://0x7f000001127.0.0.1, http://017700000001127.0.0.1, http://0177.0.0.1127.0.0.1, and http://123456789073.150.2.210.
  • Rust does not drop Windows drive segments* while normalizing dot segments, as in file://hello/c:/...
  • Rust drops any hostname when the path starts with a Windows drive segment*. For example, after normalizing file://hello/c:/.., the host is empty.
  • Rust converts non-ASCII characters in a hostname to their Punycode equivalents. For example, https://bücher.com/ has the hostname xn--bcher-kva.com.
  • Rust normalizes dot segments through one level of URL encoding in the path.