|
@ -234,7 +234,7 @@ function urlParse(url, parseQueryString, slashesDenoteHost) { |
|
|
} |
|
|
} |
|
|
out.hostname = newOut.join('.'); |
|
|
out.hostname = newOut.join('.'); |
|
|
|
|
|
|
|
|
out.host = (out.hostname || '') + |
|
|
out.host = (out.hostname || '') + |
|
|
((out.port) ? ':' + out.port : ''); |
|
|
((out.port) ? ':' + out.port : ''); |
|
|
out.href += out.host; |
|
|
out.href += out.host; |
|
|
} |
|
|
} |
|
@ -419,7 +419,7 @@ function urlResolveObject(source, relative) { |
|
|
//to support http.request
|
|
|
//to support http.request
|
|
|
if (source.pathname !== undefined || source.search !== undefined) { |
|
|
if (source.pathname !== undefined || source.search !== undefined) { |
|
|
source.path = (source.pathname ? source.pathname : '') + |
|
|
source.path = (source.pathname ? source.pathname : '') + |
|
|
(source.search ? source.search : ''); |
|
|
(source.search ? source.search : ''); |
|
|
} |
|
|
} |
|
|
source.slashes = source.slashes || relative.slashes; |
|
|
source.slashes = source.slashes || relative.slashes; |
|
|
source.href = urlFormat(source); |
|
|
source.href = urlFormat(source); |
|
@ -504,7 +504,7 @@ function urlResolveObject(source, relative) { |
|
|
//to support http.request
|
|
|
//to support http.request
|
|
|
if (source.pathname !== undefined || source.search !== undefined) { |
|
|
if (source.pathname !== undefined || source.search !== undefined) { |
|
|
source.path = (source.pathname ? source.pathname : '') + |
|
|
source.path = (source.pathname ? source.pathname : '') + |
|
|
(source.search ? source.search : ''); |
|
|
(source.search ? source.search : ''); |
|
|
} |
|
|
} |
|
|
source.href = urlFormat(source); |
|
|
source.href = urlFormat(source); |
|
|
return source; |
|
|
return source; |
|
@ -590,7 +590,7 @@ function urlResolveObject(source, relative) { |
|
|
//to support request.http
|
|
|
//to support request.http
|
|
|
if (source.pathname !== undefined || source.search !== undefined) { |
|
|
if (source.pathname !== undefined || source.search !== undefined) { |
|
|
source.path = (source.pathname ? source.pathname : '') + |
|
|
source.path = (source.pathname ? source.pathname : '') + |
|
|
(source.search ? source.search : ''); |
|
|
(source.search ? source.search : ''); |
|
|
} |
|
|
} |
|
|
source.auth = relative.auth || source.auth; |
|
|
source.auth = relative.auth || source.auth; |
|
|
source.slashes = source.slashes || relative.slashes; |
|
|
source.slashes = source.slashes || relative.slashes; |
|
|