return correct obj and ws

This commit is contained in:
AJ ONeal 2018-06-29 02:20:07 -06:00
parent dcc5ba0c7e
commit db01707e13
1 changed files with 7 additions and 2 deletions

View File

@ -213,11 +213,16 @@ function setDefaults(defs) {
if ('unix' !== (obj.hostname||obj.host||'').toLowerCase()) {
return obj;
}
obj.hostname = null;
obj.href = null;
obj.hostname = obj.host = null;
paths = (obj.pathname||obj.path||'').split(':');
obj.socketPath = paths.shift();
obj.pathname = obj.path = paths.join(':');
obj.href = null;
return obj;
}
function urequest(opts, cb) {