Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for topPrivateDomain (0.2 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()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  2. 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)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 24 09:33:12 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  3. 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")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  4. 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")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1K bytes
    - Viewed (0)
  5. 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.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  6. 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()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  7. 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.
       *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:12:05 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/HttpUrl.kt

       *
       * In general this method **should not** be used to test whether a domain is valid or routable.
       * Instead, DNS is the recommended source for that information.
       *
       * | URL                           | `topPrivateDomain()` |
       * | :---------------------------- | :------------------- |
       * | `http://google.com`           | `"google.com"`       |
       * | `http://adwords.google.co.uk` | `"google.co.uk"`     |
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 63.5K bytes
    - Viewed (1)
  9. CHANGELOG.md

        attempt multiple TLS handshakes for the same call concurrently.
     *  Fix: Don't crash loading the public suffix database in GraalVM native images. The function
        `HttpUrl.topPrivateDomain()` uses a resource file to identify private domains, but we didn't
        include this file on GraalVM.
    
    
    ## Version 5.0.0-alpha.4
    
    _2022-02-01_
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:31:39 GMT 2024
    - 21.4K bytes
    - Viewed (0)
  10. docs/changelogs/changelog_3x.md

        cookies on top-level domains like `co.uk` because our cookie parser didn't honor the [public
        suffix][public_suffix] list. Alongside this fix is a new API, `HttpUrl.topPrivateDomain()`,
        which returns the privately domain name if the URL has one.
     *  Fix: Change `MediaType.charset()` to return null for unexpected charsets.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 14:55:54 GMT 2022
    - 50.8K bytes
    - Viewed (0)
Back to top