Skip to content

Commit

Permalink
Make sure the target port is an integer
Browse files Browse the repository at this point in the history
This fixes a bug that caused cli to fail when --target was specified with both hostname and port
  • Loading branch information
jnordberg committed Sep 17, 2011
1 parent bdf48be commit 5ba25aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/node-http-proxy
Expand Up @@ -64,7 +64,7 @@ if (typeof target === 'string') location = target.split(':');
//
var server;
if (location) {
var targetPort = location.length === 1 ? 80 : location[1];
var targetPort = location.length === 1 ? 80 : parseInt(location[1]);
server = httpProxy.createServer(targetPort, location[0], config);
}
else if (config.router) {
Expand Down

0 comments on commit 5ba25aa

Please sign in to comment.