Every engine rule for a base URL, in order: a URL that parses, the http: or
https: scheme, no query or fragment — request paths are appended to the base URL
as a string, so a ? or # would swallow every path (http://h/#f requests /)
— no backslash (WHATWG ends an http(s) host at one, as at a /, while text-based code
reads on, so https://u:pw@a.example\@b.example was checked as a.example and its
credentials went to b.example), no % in the userinfo that doesn't start an escape (%25
for a literal one: the engine percent-decodes it for the Authorization header), no
whitespace or control characters (see baseUrlWhitespaceProblem), and the scheme
followed by exactly // and the host (http:host, http:/host, http:///host are
repaired by WHATWG silently into another URL than the one typed).
The reasons never echo the URL, so a credential in it cannot leak. (A path that
already ends in the API path is the client's rule, baseUrlApiPathProblem.)
Every engine rule for a base URL, in order: a URL that parses, the
http:orhttps:scheme, no query or fragment — request paths are appended to the base URL as a string, so a?or#would swallow every path (http://h/#frequests/) — no backslash (WHATWG ends an http(s) host at one, as at a/, while text-based code reads on, sohttps://u:pw@a.example\@b.examplewas checked as a.example and its credentials went to b.example), no%in the userinfo that doesn't start an escape (%25for a literal one: the engine percent-decodes it for the Authorization header), no whitespace or control characters (see baseUrlWhitespaceProblem), and the scheme followed by exactly//and the host (http:host,http:/host,http:///hostare repaired by WHATWG silently into another URL than the one typed). The reasons never echo the URL, so a credential in it cannot leak. (A path that already ends in the API path is the client's rule,baseUrlApiPathProblem.)