diff options
Diffstat (limited to 'lib/url.js')
-rw-r--r-- | lib/url.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/url.js b/lib/url.js index f50d180c7a..edc55c87aa 100644 --- a/lib/url.js +++ b/lib/url.js @@ -258,7 +258,7 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) { rest = rest.slice(proto.length); } - // figure out if it's got a host + // Figure out if it's got a host // user@server is *always* interpreted as a hostname, and url // resolution will treat //foo/bar as host=foo,path=bar because that's // how the browser resolves relative URLs. @@ -448,7 +448,7 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) { this.pathname = '/'; } - // to support http.request + // To support http.request if (this.pathname || this.search) { const p = this.pathname || ''; const s = this.search || ''; @@ -746,7 +746,7 @@ Url.prototype.resolveObject = function resolveObject(relative) { result.auth = relative.auth; result.hostname = relative.hostname || relative.host; result.port = relative.port; - // to support http.request + // To support http.request if (result.pathname || result.search) { var p = result.pathname || ''; var s = result.search || ''; @@ -819,7 +819,7 @@ Url.prototype.resolveObject = function resolveObject(relative) { result.search = relative.search; result.query = relative.query; } else if (relative.search !== null && relative.search !== undefined) { - // just pull out the search. + // Just pull out the search. // like href='?foo'. // Put this after the other two cases because it simplifies the booleans if (noLeadingSlashes) { @@ -846,8 +846,7 @@ Url.prototype.resolveObject = function resolveObject(relative) { } if (!srcPath.length) { - // no path at all. easy. - // we've already handled the other stuff above. + // No path at all. All other things were already handled above. result.pathname = null; // To support http.request if (result.search) { |