Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for getEffectiveTldPlusOne (0.11 sec)

  1. okhttp/src/commonTest/kotlin/okhttp3/internal/publicsuffix/ConfiguredPublicSuffixDatabaseTest.kt

        assertThat(publicSuffixDatabase.getEffectiveTldPlusOne("example.com"))
          .isEqualTo("example.com")
        assertThat(publicSuffixDatabase.getEffectiveTldPlusOne("foo.example.com"))
          .isEqualTo("example.com")
        assertThat(publicSuffixDatabase.getEffectiveTldPlusOne("foo.bar.square.com"))
          .isEqualTo("bar.square.com")
        assertThat(publicSuffixDatabase.getEffectiveTldPlusOne("foo.my.square.com"))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.7K bytes
    - Viewed (0)
  2. okhttp/src/commonTest/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabaseTest.kt

            publicSuffix = publicSuffix.replace("\\*".toRegex(), "square")
          }
          assertThat(publicSuffixDatabase.getEffectiveTldPlusOne(publicSuffix)).isNull()
          val test = "foobar.$publicSuffix"
          assertThat(publicSuffixDatabase.getEffectiveTldPlusOne(test)).isEqualTo(test)
        }
      }
    
      @Test
      fun publicSuffixExceptions() {
        val buffer = Buffer()
        FileSystem.SYSTEM.read(pathForTests) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 22:00:49 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt

       *
       * Here are some examples:
       *
       * ```java
       * assertEquals("google.com", getEffectiveTldPlusOne("google.com"));
       * assertEquals("google.com", getEffectiveTldPlusOne("www.google.com"));
       * assertNull(getEffectiveTldPlusOne("com"));
       * assertNull(getEffectiveTldPlusOne("localhost"));
       * assertNull(getEffectiveTldPlusOne("mymacbook"));
       * ```
       *
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 07:33:49 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  4. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

            BootstrapDns(builder.url!!.host, hosts)
          } else {
            builder.systemDns
          }
        }
    
        internal fun isPrivateHost(host: String): Boolean = PublicSuffixDatabase.get().getEffectiveTldPlusOne(host) == null
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat May 10 11:15:14 UTC 2025
    - 8.6K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Cookie.kt

          }
    
          // If the domain is a suffix of the url host, it must not be a public suffix.
          if (urlHost.length != domain.length &&
            PublicSuffixDatabase.get().getEffectiveTldPlusOne(domain) == null
          ) {
            return null
          }
    
          // If the path is absent or didn't start with '/', use the default path. It's a string like
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 23.1K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/HttpUrl.kt

       * | `http://127.0.0.1`            | null                 |
       */
      fun topPrivateDomain(): String? =
        if (host.canParseAsIpAddress()) {
          null
        } else {
          PublicSuffixDatabase.get().getEffectiveTldPlusOne(host)
        }
    
      @JvmName("-deprecated_url")
      @Deprecated(
        message = "moved to toUrl()",
        replaceWith = ReplaceWith(expression = "toUrl()"),
        level = DeprecationLevel.ERROR,
      )
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 63.5K bytes
    - Viewed (0)
Back to top