From 12af4313cb80e5dc39e1f7ee4098b6243b3ccdc7 Mon Sep 17 00:00:00 2001 From: Vsevolod Strukchinsky Date: Wed, 10 Feb 2016 13:19:50 +0500 Subject: [PATCH] fix port normalization --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f91b697..6035861 100644 --- a/index.js +++ b/index.js @@ -207,7 +207,7 @@ function normalizeArguments(url, opts) { opts ); - if (!Number.isInteger(opts.port)) { + if (opts.port === null) { opts.port = opts.protocol === 'http' ? 80 : 443; }