Skip to content
Open
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
4 changes: 2 additions & 2 deletions lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

var http = require('http')
, https = require('https')
, tls = require('tls')
, methods = require('methods')
, superagent = require('superagent')
, Agent = superagent.agent
Expand Down Expand Up @@ -283,7 +283,7 @@ function serverAddress (app, path) {
if (!addr) {
throw new Error('Server is not listening')
}
var protocol = (app instanceof https.Server) ? 'https' : 'http';
var protocol = (app instanceof tls.Server) ? 'https' : 'http';
// If address is "unroutable" IPv4/6 address, then set to localhost
if (addr.address === '0.0.0.0' || addr.address === '::') {
addr.address = '127.0.0.1';
Expand Down