Przeglądaj źródła

Update comment for domain to mention opaque hosts

Valentin Gosu 9 lat temu
rodzic
commit
8646115a4e
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      src/host.rs

+ 3 - 1
src/host.rs

@@ -73,7 +73,9 @@ impl<S> From<Host<S>> for HostInternal {
 #[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
 pub enum Host<S=String> {
     /// A DNS domain name, as '.' dot-separated labels.
-    /// Non-ASCII labels are encoded in punycode per IDNA.
+    /// Non-ASCII labels are encoded in punycode per IDNA if this is the host of
+    /// a special URL, or percent encoded for non-special URLs. Hosts for
+    /// non-special URLs are also called opaque hosts.
     Domain(S),
 
     /// An IPv4 address.