Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 1 addition & 8 deletions src/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down