From 89f9ca1e89d679b2b85a8f85b65e8b0878694207 Mon Sep 17 00:00:00 2001 From: Jarrett Cruger Date: Mon, 8 Dec 2014 23:04:41 -0500 Subject: [PATCH] [test] show that we support protocol without the colon --- test/lib-http-proxy-common-test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/lib-http-proxy-common-test.js b/test/lib-http-proxy-common-test.js index 87777c2..559c02e 100644 --- a/test/lib-http-proxy-common-test.js +++ b/test/lib-http-proxy-common-test.js @@ -185,6 +185,18 @@ describe('lib/http-proxy/common.js', function () { expect(outgoing.path).to.eql('some-path/am'); }); + it('should properly detect https/wss protocol without the colon', function () { + var outgoing = {}; + common.setupOutgoing(outgoing, { + target: { + protocol: 'https', + host: 'whatever.com' + } + }, { url: '/' }); + + expect(outgoing.port).to.eql(443); + }); + it('should not prepend the target path to the outgoing path with prependPath = false', function () { var outgoing = {}; common.setupOutgoing(outgoing, {