File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -803,7 +803,8 @@ impl Url {
803803
804804 /// Return the string representation of the host (domain or IP address) for this URL, if any.
805805 ///
806- /// Non-ASCII domains are punycode-encoded per IDNA.
806+ /// Non-ASCII domains are punycode-encoded per IDNA if this is the host
807+ /// of a special URL, or percent encoded for non-special URLs.
807808 /// IPv6 addresses are given between `[` and `]` brackets.
808809 ///
809810 /// Cannot-be-a-base URLs (typical of `data:` and `mailto:`) and some `file:` URLs
@@ -842,7 +843,8 @@ impl Url {
842843 }
843844
844845 /// Return the parsed representation of the host for this URL.
845- /// Non-ASCII domain labels are punycode-encoded per IDNA.
846+ /// Non-ASCII domain labels are punycode-encoded per IDNA if this is the host
847+ /// of a special URL, or percent encoded for non-special URLs.
846848 ///
847849 /// Cannot-be-a-base URLs (typical of `data:` and `mailto:`) and some `file:` URLs
848850 /// don’t have a host.
@@ -881,6 +883,8 @@ impl Url {
881883 }
882884
883885 /// If this URL has a host and it is a domain name (not an IP address), return it.
886+ /// Non-ASCII domains are punycode-encoded per IDNA if this is the host
887+ /// of a special URL, or percent encoded for non-special URLs.
884888 ///
885889 /// # Examples
886890 ///
You can’t perform that action at this time.
0 commit comments