Skip to content

Commit 997ae1b

Browse files
authored
Merge pull request #7 from m90/master
Fix issues with logged urls in default handler
2 parents 3a95b43 + 50d1cd5 commit 997ae1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function time(start) {
2424
function defaultHandler(request, options, cb) {
2525
options = typeof options === 'string' ? urlParse(options) : options;
2626

27-
var url = options.href || (options.protocol || 'http://') + options.host + options.path;
27+
var url = options.href || (options.protocol || 'http:') + '//' + (options.host || options.hostname) + options.path;
2828
var method = (options.method || 'GET').toUpperCase();
2929
var signature = method + ' ' + url;
3030
var start = new Date();

0 commit comments

Comments
 (0)