We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3a95b43 + 50d1cd5 commit 997ae1bCopy full SHA for 997ae1b
index.js
@@ -24,7 +24,7 @@ function time(start) {
24
function defaultHandler(request, options, cb) {
25
options = typeof options === 'string' ? urlParse(options) : options;
26
27
- var url = options.href || (options.protocol || 'http://') + options.host + options.path;
+ var url = options.href || (options.protocol || 'http:') + '//' + (options.host || options.hostname) + options.path;
28
var method = (options.method || 'GET').toUpperCase();
29
var signature = method + ' ' + url;
30
var start = new Date();
0 commit comments