diff --git a/lib/util.js b/lib/util.js index 4b8e488..87db7e7 100644 --- a/lib/util.js +++ b/lib/util.js @@ -720,6 +720,7 @@ _.parseUrl = function(url, opt){ opt = opt || {}; url = Url.parse(url); var ssl = url.protocol === 'https:'; + opt.protocol = url.protocol; opt.host = opt.host || opt.hostname || ((ssl || url.protocol === 'http:') ? url.hostname : 'localhost');