Skip to main content

normalize_host

Function normalize_host 

Source
pub(crate) fn normalize_host(host: &str) -> String
Expand description

Folds host to the form every bookkeeping map keys on.

RFC 1035 3.1 makes DNS name comparison case-insensitive: A.example and a.example are one name. Every map in this module is keyed on the lowercased spelling so that two spellings of one host read and write one entry, instead of each believing the other’s values are not there.