- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for topPrivateDomain (0.07 sec)
-
okhttp/src/jvmTest/kotlin/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 Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 12K bytes - Viewed (0) -
android-test/src/test/kotlin/okhttp/android/test/BaseOkHttpClientUnitTest.kt
assertThat(response.cacheResponse).isNotNull() } } @Test open fun testPublicSuffixDb() { val httpUrl = "https://www.google.co.uk".toHttpUrl() assertThat(httpUrl.topPrivateDomain()).isEqualTo("google.co.uk") } private fun assumeNetwork() { try { InetAddress.getByName("www.google.com") } catch (uhe: UnknownHostException) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jul 22 20:03:31 UTC 2025 - 2.3K bytes - Viewed (0) -
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 Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 17.5K bytes - Viewed (0) -
native-image-tests/src/test/kotlin/okhttp3/nativeimage/PublicSuffixDatabaseTest.kt
import org.junit.jupiter.api.Test class PublicSuffixDatabaseTest { @Test fun testResourcesLoaded() { val url = "https://api.twitter.com".toHttpUrl() assertThat(url.topPrivateDomain()).isEqualTo("twitter.com") }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jul 04 08:15:11 UTC 2025 - 964 bytes - Viewed (0) -
android-test-app/src/main/kotlin/okhttp/android/testapp/MainActivity.kt
val client = OkHttpClient() // Ensure we are compiling against the right variant println(AndroidPlatform.isSupported) 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 Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Aug 19 08:10:39 UTC 2025 - 1.7K bytes - Viewed (0) -
android-test/src/test/kotlin/okhttp/android/test/DisabledInitialiserTest.kt
Platform.resetForTests() PlatformRegistry.applicationContext = null } @Test fun testWithoutContext() { val httpUrl = "https://www.google.co.uk".toHttpUrl() assertFailure { httpUrl.topPrivateDomain() }.all { hasMessage("Unable to load PublicSuffixDatabase.list resource.") cause().isNotNull().all { hasMessage( "Platform applicationContext not initialized. " +
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 16:25:39 UTC 2025 - 2.1K bytes - Viewed (0) -
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 Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Apr 17 13:25:31 UTC 2024 - 25.2K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 27.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/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 Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 46.5K bytes - Viewed (0)