From 8a88774ecf85cc3c259bb50342a82c5725c05f6a Mon Sep 17 00:00:00 2001 From: Colton Baker Date: Tue, 6 Nov 2012 17:47:47 -0500 Subject: [PATCH] [fix] Convert strings to numbers if possible in `.createServer` Fixes #321 --- lib/node-http-proxy.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/node-http-proxy.js b/lib/node-http-proxy.js index 01f2b9d..b9bd914 100644 --- a/lib/node-http-proxy.js +++ b/lib/node-http-proxy.js @@ -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;