Lines Matching refs:hostname

76   this.hostname = null;
146 function isIpv6Hostname(hostname) {
148 StringPrototypeCharCodeAt(hostname, 0) === CHAR_LEFT_SQUARE_BRACKET &&
149 StringPrototypeCharCodeAt(hostname, hostname.length - 1) ===
161 // - '@' since this could cause parts of the hostname to be confused with auth
162 // - '[' and ']' since this could cause a non-IPv6 hostname to be interpreted
281 // user@server is *always* interpreted as a hostname, and url
297 // there's a hostname.
300 // If there is an @ in the hostname, then non-host chars *are* allowed
334 // Characters that are never ever allowed in a hostname from RFC 2396
372 // We've indicated that there is a hostname,
374 if (typeof this.hostname !== 'string')
375 this.hostname = '';
377 const hostname = this.hostname;
379 // If hostname begins with [ and ends with ]
381 const ipv6Hostname = isIpv6Hostname(hostname);
385 rest = getHostname(this, rest, hostname);
388 if (this.hostname.length > hostnameMaxLen) {
389 this.hostname = '';
392 this.hostname = this.hostname.toLowerCase();
395 if (this.hostname !== '') {
397 if (forbiddenHostCharsIpv6.test(this.hostname)) {
405 this.hostname = toASCII(this.hostname);
407 // Prevent two potential routes of hostname spoofing.
408 // 1. If this.hostname is empty, it must have become empty due to toASCII
409 // since we checked this.hostname above.
410 // 2. If any of forbiddenHostChars appears in this.hostname, it must have
416 if (this.hostname === '' || forbiddenHostChars.test(this.hostname)) {
423 const h = this.hostname || '';
426 // strip [ and ] from the hostname
429 this.hostname = this.hostname.slice(1, -1);
485 this.hostname && !this.pathname) {
501 function getHostname(self, rest, hostname) {
502 for (let i = 0; i < hostname.length; ++i) {
503 const code = hostname.charCodeAt(i);
511 self.hostname = hostname.slice(0, i);
512 return `/${hostname.slice(i)}${rest}`;
638 } else if (this.hostname) {
640 this.hostname.includes(':') && !isIpv6Hostname(this.hostname) ?
641 '[' + this.hostname + ']' :
642 this.hostname
758 result.hostname && !result.pathname) {
792 if (!relative.hostname) relative.hostname = '';
803 result.hostname = relative.hostname || relative.host;
830 // to crawl up to the hostname, as well. This is strange.
834 result.hostname = '';
842 relative.hostname = null;
861 if (relative.hostname || relative.hostname === '') {
862 if (result.hostname !== relative.hostname) result.auth = null;
863 result.hostname = relative.hostname;
882 result.hostname = result.host = srcPath.shift();
890 result.host = result.hostname = authInHost.shift();
962 result.hostname =
971 result.host = result.hostname = authInHost.shift();
1009 if (host) this.hostname = host;