The full base-URL rule set, in order: no whitespace or control characters
(baseUrlWhitespaceProblem), an absolute URL, an http:/https: scheme, no
query or fragment, no backslash, no % in the userinfo that doesn't start a valid escape
(%25 for a literal one), and the scheme followed by exactly // and the host. Request
paths are appended to the base URL as a string, so a ? or # in it would swallow every
path: http://h/?x=1 requests /?x=1/webservices/... and http://h/#f requests /.
WHATWG ends an http(s) host at a backslash, as at a /, while text-based code reads on, so
https://u:pw@a.example\@b.example was checked as one host and could send its credentials
to another; and it skips any slashes after http: and repairs http:host, http:/host
and http:///host silently, so the host requested would not be the one typed. A path
prefix is fine, and userinfo is allowed (Node sends it as Basic auth). The reasons name no
URL, nor a part of it, so a credential in it never reaches a message.
The full base-URL rule set, in order: no whitespace or control characters (baseUrlWhitespaceProblem), an absolute URL, an
http:/https:scheme, no query or fragment, no backslash, no%in the userinfo that doesn't start a valid escape (%25for a literal one), and the scheme followed by exactly//and the host. Request paths are appended to the base URL as a string, so a?or#in it would swallow every path:http://h/?x=1requests/?x=1/webservices/...andhttp://h/#frequests/. WHATWG ends an http(s) host at a backslash, as at a/, while text-based code reads on, sohttps://u:pw@a.example\@b.examplewas checked as one host and could send its credentials to another; and it skips any slashes afterhttp:and repairshttp:host,http:/hostandhttp:///hostsilently, so the host requested would not be the one typed. A path prefix is fine, and userinfo is allowed (Node sends it as Basic auth). The reasons name no URL, nor a part of it, so a credential in it never reaches a message.