diff options
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/net.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/webmentions_ssg/net.py b/webmentions_ssg/net.py index b827180..df62ca7 100644 --- a/webmentions_ssg/net.py +++ b/webmentions_ssg/net.py @@ -279,19 +279,6 @@ def resolve_public_addresses( return tuple(str(address) for address in addresses) -def normalized_hostname(url: str) -> str | None: - """Return a normalized URL hostname, or None for malformed URLs. - - :param url: URL from which to extract a hostname. - :returns: Normalized hostname, or ``None`` when the URL is invalid or has no host. - """ - try: - hostname = urlsplit(url).hostname - except TypeError, ValueError: - return None - return hostname.rstrip(".") if hostname is not None else None - - def media_type_of(headers: Mapping[str, str]) -> str: """Return a normalized media type without Content-Type parameters. |
