Lines Matching refs:host

74   this.host = null;
156 // "forbidden host code point" in the WHATWG URL Standard [1] and the
157 // characters in the host parsing loop in Url.prototype.parse, with the
165 // [1]: https://url.spec.whatwg.org/#forbidden-host-code-point
280 // Figure out if it's got a host
282 // resolution will treat //foo/bar as host=foo,path=bar because that's
298 // the first instance of /, ?, ;, or # ends the host.
300 // If there is an @ in the hostname, then non-host chars *are* allowed
301 // to the left of the last @ sign, unless some host-ending character
306 // http://a@b@c/ => user:a@b host:c
307 // http://a@b?@c => user:a host:b path:/?@c
341 // Find the first instance of any host-ending characters
362 this.host = rest.slice(start);
365 this.host = rest.slice(start, nonHost);
413 // Rather than trying to correct this by moving the non-host part into
424 this.host = h + p;
427 // the host field still retains them, though
436 // Now rest is set to the post-host stuff.
633 let host = '';
636 if (this.host) {
637 host = auth + this.host;
639 host = auth + (
645 host += ':' + this.port;
686 if (this.slashes || host) {
689 host = '//' + host;
695 host = '//';
706 return protocol + host + pathname + search + hash;
769 // first, if it's not file:, then we MUST have a host,
772 // if it is file:, then the host is dropped,
786 if (!relative.host &&
790 while (relPath.length && !(relative.host = relPath.shift()));
791 if (!relative.host) relative.host = '';
801 result.host = relative.host || '';
803 result.hostname = relative.hostname || relative.host;
818 relative.host || (relative.pathname && relative.pathname.charAt(0) === '/')
821 (result.host && relative.pathname));
832 // Later on, put the first path part into the host field.
836 if (result.host) {
837 if (srcPath[0] === '') srcPath[0] = result.host;
838 else srcPath.unshift(result.host);
840 result.host = '';
845 if (relative.host) {
846 if (relPath[0] === '') relPath[0] = relative.host;
847 else relPath.unshift(relative.host);
849 relative.host = null;
856 if (relative.host || relative.host === '') {
857 if (result.host !== relative.host) result.auth = null;
858 result.host = relative.host;
882 result.hostname = result.host = srcPath.shift();
883 // Occasionally the auth can get stuck only in host.
887 result.host && result.host.indexOf('@') > 0 && result.host.split('@');
890 result.host = result.hostname = authInHost.shift();
922 ((result.host || relative.host || srcPath.length > 1) &&
960 // put the host back
963 result.host = isAbsolute ? '' : srcPath.length ? srcPath.shift() : '';
964 // Occasionally the auth can get stuck only in host.
967 const authInHost = result.host && result.host.indexOf('@') > 0 ?
968 result.host.split('@') : false;
971 result.host = result.hostname = authInHost.shift();
975 mustEndAbs = mustEndAbs || (result.host && srcPath.length);
1000 let host = this.host;
1001 let port = portPattern.exec(host);
1007 host = host.slice(0, host.length - port.length);
1009 if (host) this.hostname = host;