Every rule for a base URL, in this order: a string; an absolute URL new URL()
can parse; scheme http: or https: (the default transport also gates the
scheme per hop, but a custom transport may not); no ? or # (request paths
are appended as a string, so http://h/?x=1 would request /?x=1/api/... and
http://h/#f would request /); a % in the user name or password that starts a
valid escape (%25 for a literal one: Node decodes the userinfo for the Authorization
header and failed at request time); 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 could go to b.example); then baseUrlWhitespaceProblem; and
last the scheme followed by exactly // and the host (not http:host, http:/host or
http:///host, which WHATWG repairs silently into another URL than the one typed). The
reasons never echo the value, so credentials in it cannot leak into a message.
Userinfo is allowed: the repo deliberately sends it.
Every rule for a base URL, in this order: a string; an absolute URL
new URL()can parse; schemehttp:orhttps:(the default transport also gates the scheme per hop, but a custom transport may not); no?or#(request paths are appended as a string, sohttp://h/?x=1would request/?x=1/api/...andhttp://h/#fwould request/); a%in the user name or password that starts a valid escape (%25for a literal one: Node decodes the userinfo for the Authorization header and failed at request time); 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 could go to b.example); then baseUrlWhitespaceProblem; and last the scheme followed by exactly//and the host (nothttp:host,http:/hostorhttp:///host, which WHATWG repairs silently into another URL than the one typed). The reasons never echo the value, so credentials in it cannot leak into a message. Userinfo is allowed: the repo deliberately sends it.