diff --git a/src/cycle.js b/src/cycle.js index 72fdcbc..d689c1e 100644 --- a/src/cycle.js +++ b/src/cycle.js @@ -263,7 +263,7 @@ export default class Cycle extends EventEmitter { protocol: req.protocol, proxy: upstreamProxy, hostname: req.hostname, - port: req.port || req._getDefaultPort(), + port: req.port, method: req.method, path: req.url, headers: req.headers, diff --git a/src/request.js b/src/request.js index 84f805b..0f73c7a 100644 --- a/src/request.js +++ b/src/request.js @@ -195,20 +195,13 @@ export default class Request extends Body { if (port){ this.port = port } - //this.port = purl.port || host.port || this._getDefaultPort() + //this.port = purl.port || host.port this.method = inReq.method this.url = purl.path inReq._isOriginal = true this._source = inReq } - /** - * Returns the default port given the current protocol. - */ - _getDefaultPort(){ - return this.protocol === 'https:' ? 443 : 80 - } - // TODO: emit debug log events for things that are changed. _finalize(){ if (nonEntityMethods.hasOwnProperty(this.method)) {