split_domain_port
Return a (domain, port) tuple from a given host.
Returned domain is lowercased. If the host is invalid, the domain will be empty.
def split_domain_port(
host: string
) - > tuple
Return a (domain, port) tuple from a given host. Returned domain is lowercased. If the host is invalid, the domain will be empty.
Parameters
| Name | Type | Description |
|---|---|---|
| host | string | The raw host string containing the domain and optional port to be parsed and validated. |
Returns
| Type | Description |
|---|---|
tuple | A tuple containing the lowercased domain string (with trailing dots removed) and the port string; returns two empty strings if the host is invalid. |