-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
bugSomething isn't workingSomething isn't working
Description
If you start node lib/index.js server -l http://*:80 -l https://*:443 the server does not listen on ports 80/443, but on random ports instead.
On this line an URL is created from the listen location, but the ports 80 and 443 are set to an empty string in the URL object if the protocol is http/https:
new URL('http://localhost:80').port === ""
new URL('https://localhost:443').port === ""
Then the check in this line fails and no port is returned from listenArgsForURL which results in a random port.
I think there should be some checks like this:
if(port === '' and protocol === 'http:') port = 80;
if(port === '' and protocol === 'https:') port = 443;
Or am I doing something wrong?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working