> The trailing dot makes it an invalid URL, which defines hostname as * [ domainlabel "." ] toplabel.
I disagree. But, this is a tricky one. The relevant specs are:
Spec | | Validity | Definition
URL (RFC1738) | obsolete | invalid | hostname = *[ domainlabel "." ] toplabel
HTTP/1.0 (RFC1945) | current | invalid | host = <A legal Internet host domain name
| | | or IP address (in dotted-decimal form),
| | | as defined by Section 2.1 of RFC 1123>
HTTP/1.1 (RFC2068) | obsolete | invalid | ; same as RFC1945
HTTP/1.1 (RFC2616) | obsolete | valid | hostname = *( domainlabel "." ) toplabel [ "." ]
URI (RFC3986) | current | valid | host = IP-literal / IPv4address / reg-name
| | | reg-name = *( unreserved / pct-encoded / sub-delims )
HTTP/1.1 (RFC7230) | current | valid | uri-host = <host, see [RFC3986], Section 3.2.2>
The only way that URL is invalid is if we are in a strict HTTP/1.0 context.
As a note about RFC1738 being obsolete: these days a URL is just a URI (1) whose scheme specifies it as a URL scheme, and (2) is valid according to the scheme specification.
As the given URL is a valid URI, and is valid according to the current http URL scheme specification (RFC7230), that URL is valid.
I disagree. But, this is a tricky one. The relevant specs are:
The only way that URL is invalid is if we are in a strict HTTP/1.0 context.As a note about RFC1738 being obsolete: these days a URL is just a URI (1) whose scheme specifies it as a URL scheme, and (2) is valid according to the scheme specification.
As the given URL is a valid URI, and is valid according to the current http URL scheme specification (RFC7230), that URL is valid.