- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 36 for UnknownHostException (0.13 sec)
-
guava-tests/test/com/google/common/net/InetAddressesTest.java
} public void testForStringIPv4NonAsciiInput() throws UnknownHostException { String ipStr = "૧૯૨.૧૬૮.૦.૧"; // 192.168.0.1 in Gujarati digits // Shouldn't hit DNS, because it's an IP string literal. InetAddress ipv4Addr; try { ipv4Addr = InetAddress.getByName(ipStr); } catch (UnknownHostException e) { // OK: this is probably Android, which is stricter. return; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 24 16:44:05 UTC 2024 - 35.3K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt
return this } @Throws(UnknownHostException::class) fun lookup( hostname: String, index: Int, ): InetAddress { return hostAddresses[hostname]!![index] } @Throws(UnknownHostException::class) override fun lookup(hostname: String): List<InetAddress> { requestedHosts.add(hostname) return hostAddresses[hostname] ?: throw UnknownHostException() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.6K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt
unknownHostException.initCause(failure) for (i in 1 until failures.size) { unknownHostException.addSuppressed(failures[i]) } throw unknownHostException } private fun getCacheOnlyResponse(request: Request): Response? { if (client.cache != null) { try { // Use the cache without hitting the network first
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Oct 31 09:27:31 UTC 2024 - 9.8K bytes - Viewed (0) -
okhttp-android/src/test/kotlin/okhttp3/android/AndroidLoggingTest.kt
client.newCall(request).execute() } catch (uhe: UnknownHostException) { // expected } val logs = ShadowLog.getLogsForTag("testHttpLoggingInterceptor") assertThat(logs.map { it.type }).containsOnly(Log.INFO) assertThat(logs.map { it.msg }).containsExactly( "--> GET http://google.com/robots.txt", "<-- HTTP FAILED: java.net.UnknownHostException: shortcircuit", )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 11:07:32 UTC 2024 - 3.2K bytes - Viewed (0) -
okhttp-android/src/test/kotlin/okhttp3/android/AndroidAsyncDnsTest.kt
* limitations under the License. */ package okhttp3.android import assertk.assertFailure import assertk.assertions.hasMessage import assertk.assertions.isInstanceOf import java.net.UnknownHostException import okhttp3.AsyncDns import org.junit.Test import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config import org.robolectric.shadow.api.Shadow
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 22 20:07:09 UTC 2024 - 1.6K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/conn/IdnDnsResolver.java
import java.net.InetAddress; import java.net.URLDecoder; import java.net.UnknownHostException; import org.apache.http.conn.DnsResolver; public class IdnDnsResolver implements DnsResolver { protected int flag = 0; protected String encoding = "UTF-8"; @Override public InetAddress[] resolve(final String host) throws UnknownHostException { return InetAddress.getAllByName(toAscii(host)); }
Registered: Sun Nov 10 03:50:12 UTC 2024 - Last Modified: Thu Feb 22 01:36:27 UTC 2024 - 1.7K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/BootstrapDns.kt
import java.net.InetAddress import java.net.UnknownHostException import okhttp3.Dns /** * Internal Bootstrap DNS implementation for handling initial connection to DNS over HTTPS server. * * Returns hardcoded results for the known host. */ internal class BootstrapDns( private val dnsHostname: String, private val dnsServers: List<InetAddress>, ) : Dns { @Throws(UnknownHostException::class)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.3K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt
require(flags shr 15 != 0) { "not a response" } val responseCode = flags and 0xf if (responseCode == NXDOMAIN) { throw UnknownHostException("$hostname: NXDOMAIN") } else if (responseCode == SERVFAIL) { throw UnknownHostException("$hostname: SERVFAIL") } val questionCount = buf.readShort().toInt() and 0xffff val answerCount = buf.readShort().toInt() and 0xffff
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.8K bytes - Viewed (0) -
okhttp-android/src/test/kotlin/okhttp3/android/RobolectricOkHttpClientTest.kt
import assertk.assertThat import assertk.assertions.isEqualTo import assertk.assertions.isNotNull import assertk.assertions.isNull import java.net.InetAddress import java.net.UnknownHostException import okhttp3.Cache import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.OkHttpClient import okhttp3.Request import okio.Path.Companion.toPath import okio.fakefilesystem.FakeFileSystem
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 2.5K bytes - Viewed (0) -
okhttp-android/src/androidTest/kotlin/okhttp3/android/AndroidAsyncDnsTest.kt
import assertk.assertions.isEmpty import assertk.assertions.isEqualTo import assertk.assertions.isNotEmpty import assertk.assertions.isNull import assertk.fail import java.net.InetAddress import java.net.UnknownHostException import java.util.concurrent.CountDownLatch import mockwebserver3.MockResponse import mockwebserver3.junit4.MockWebServerRule import okhttp3.AsyncDns import okhttp3.HttpUrl.Companion.toHttpUrl
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0)