Closed
Description
- Version: v4.5.0, v6.7.0
- Platform: Linux 3.16.0-76-generic x86_64, Linux 4.7.6-1-ARCH x86_64, FreeBSD 10.1-RELEASE-p26 amd64
- Subsystem: url
The url.resolve()
function behaves differently depending on the protocol given in the from
parameter.
See this example:
> var url = require("url");
undefined
> url.resolve("https://foo.tld", "bar");
'https://foo.tld/bar'
> url.resolve("wss://foo.tld", "bar");
'wss://bar'
> url.resolve("ftps://foo.tld", "bar");
'ftps://bar'
When reading this function's documentation, this is not a behavior that I could foresee. I would have expected 'wss://foo.tld/bar'
and 'ftps://foo.tld/bar'
as results of the last two calls respectively.