Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for topPrivateDomain (0.15 sec)

  1. okhttp/src/test/java/okhttp3/HttpUrlJvmTest.kt

          .isEqualTo("xn--ewv.xn--4pvxs.jp")
        assertThat("https://co.uk".toHttpUrl().topPrivateDomain()).isNull()
        assertThat("https://square".toHttpUrl().topPrivateDomain()).isNull()
        assertThat("https://栃木.jp".toHttpUrl().topPrivateDomain()).isNull()
        assertThat("https://xn--4pvxs.jp".toHttpUrl().topPrivateDomain()).isNull()
        assertThat("https://localhost".toHttpUrl().topPrivateDomain()).isNull()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  2. android-test-app/src/androidTest/kotlin/okhttp/android/testapp/PublicSuffixDatabaseTest.kt

     */
    class PublicSuffixDatabaseTest {
      @Test
      fun testTopLevelDomain() {
        assertThat("https://www.google.com/robots.txt".toHttpUrl().topPrivateDomain()).isEqualTo("google.com")
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/net/InternetDomainNameTest.java

        InternetDomainName googleDomain = InternetDomainName.from("google.com");
    
        assertEquals(googleDomain, googleDomain.topPrivateDomain());
        assertEquals(googleDomain, googleDomain.child("mail").topPrivateDomain());
        assertEquals(googleDomain, googleDomain.child("foo.bar").topPrivateDomain());
      }
    
      public void testInvalidTopPrivateDomain() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  4. native-image-tests/src/main/kotlin/okhttp3/PublicSuffixDatabaseTest.kt

    class PublicSuffixDatabaseTest {
      @RegisterExtension
      @JvmField
      val platform = PlatformRule()
    
      @Test
      fun testResourcesLoaded() {
        val url = "https://api.twitter.com".toHttpUrl()
    
        assertThat(url.topPrivateDomain()).isEqualTo("twitter.com")
      }
    
      @Test
      fun testPublicSuffixes() {
        platform.assumeNotGraalVMImage()
    
        val metadata = FileSystem.RESOURCES.metadata(PublicSuffixDatabase.PUBLIC_SUFFIX_RESOURCE)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Dec 24 09:33:12 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  5. android-test-app/src/main/kotlin/okhttp/android/testapp/MainActivity.kt

      override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
    
        val client = OkHttpClient()
    
        val url = "https://github.com/square/okhttp".toHttpUrl()
        println(url.topPrivateDomain())
    
        client.newCall(Request(url)).enqueue(
          object : Callback {
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              println("failed: $e")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  6. docs/changelogs/changelog_4x.md

     *  Fix: Recover gracefully when a cache entry's certificate is corrupted.
    
     *  Fix: Fail permanently when there's a failure loading the bundled public suffix database.
        This is the dataset that powers `HttpUrl.topPrivateDomain()`.
    
     *  Fix: Immediately update the connection's flow control window instead of waiting for the
        receiving stream to process it.
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 17 13:25:31 UTC 2024
    - 25.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/net/InternetDomainName.java

       * controls.
       *
       * @throws IllegalStateException if this domain does not end with a public suffix
       * @since 6.0
       */
      public InternetDomainName topPrivateDomain() {
        if (isTopPrivateDomain()) {
          return this;
        }
        checkState(isUnderPublicSuffix(), "Not under a public suffix: %s", name);
        return ancestor(publicSuffixIndex() - 1);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Feb 05 20:47:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  8. guava/src/com/google/common/net/InternetDomainName.java

       * controls.
       *
       * @throws IllegalStateException if this domain does not end with a public suffix
       * @since 6.0
       */
      public InternetDomainName topPrivateDomain() {
        if (isTopPrivateDomain()) {
          return this;
        }
        checkState(isUnderPublicSuffix(), "Not under a public suffix: %s", name);
        return ancestor(publicSuffixIndex() - 1);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Feb 05 20:47:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        val redact: String = httpUrl.redact()
        var builder: HttpUrl.Builder = httpUrl.newBuilder()
        var resolveBuilder: HttpUrl.Builder? = httpUrl.newBuilder("")
        val topPrivateDomain: String? = httpUrl.topPrivateDomain()
        val resolve: HttpUrl? = httpUrl.resolve("")
        val getFromUrl: HttpUrl? = URL("").toHttpUrlOrNull()
        val getFromUri: HttpUrl? = URI("").toHttpUrlOrNull()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/Cookie.kt

      @get:JvmName("hostOnly") val hostOnly: Boolean,
      /**
       * Returns a string describing whether this cookie is sent for cross-site calls.
       *
       * Two URLs are on the same site if they share a [top private domain][HttpUrl.topPrivateDomain].
       * Otherwise, they are cross-site URLs.
       *
       * When a URL is requested, it may be in the context of another URL.
       *
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 06 04:12:05 UTC 2024
    - 23.1K bytes
    - Viewed (0)
Back to top