UrlParser uses the URL constructor to determine whether the string passed is a browser URL or not.
Unfortunately, absolute windows paths (e.g. C:\an\absolute\path) are successfully parsed as URLs by URL. (e.g. C:\an\absolute\path having protocol: 'c:' and pathname: '\\an\\absolute\\path')
This results in the windows path being sent to request leading to an error of the form Error: Invalid URI "c:/an/absolute/path".
UrlParser uses the
URL
constructor to determine whether the string passed is a browser URL or not.Unfortunately, absolute windows paths (e.g.
C:\an\absolute\path
) are successfully parsed as URLs byURL
. (e.g.C:\an\absolute\path
havingprotocol: 'c:'
andpathname: '\\an\\absolute\\path'
)This results in the windows path being sent to
request
leading to an error of the formError: Invalid URI "c:/an/absolute/path"
.