Skip to content

Commit

Permalink
[fix] Convert strings to numbers if possible in .createServer
Browse files Browse the repository at this point in the history
Fixes #321
  • Loading branch information
Southern committed Nov 6, 2012
1 parent b8c27ed commit 8a88774
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/node-http-proxy.js
Expand Up @@ -74,6 +74,7 @@ exports.createServer = function () {
// **NEED MORE HERE!!!**
//
args.forEach(function (arg) {
arg = Number(arg) || arg;
switch (typeof arg) {
case 'string': host = arg; break;
case 'number': port = arg; break;
Expand Down

0 comments on commit 8a88774

Please sign in to comment.