Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 226 for patch (0.18 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/platform/ConscryptPlatform.kt

              else -> false
            }
          } catch (e: NoClassDefFoundError) {
            false
          } catch (e: ClassNotFoundException) {
            false
          }
    
        fun buildIfSupported(): ConscryptPlatform? = if (isSupported) ConscryptPlatform() else null
    
        fun atLeastVersion(
          major: Int,
          minor: Int = 0,
          patch: Int = 0,
        ): Boolean {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

            break
          } catch (socketException: IOException) {
            // If there's a socket exception, this must have a streamed request body.
            assertThat(j).isEqualTo(0)
            assertThat(transferKind).isIn(TransferKind.CHUNKED, TransferKind.FIXED_LENGTH)
          }
        }
        val requestA = server.takeRequest()
        assertThat(requestA.path).isEqualTo("/a")
        val requestB = server.takeRequest()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  3. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/UnixDomainSocketFactory.java

    public final class UnixDomainSocketFactory extends SocketFactory {
      private final File path;
    
      public UnixDomainSocketFactory(File path) {
        this.path = path;
      }
    
      @Override public Socket createSocket() throws IOException {
        UnixSocketChannel channel = UnixSocketChannel.open();
        return new TunnelingUnixSocket(path, channel);
      }
    
      @Override public Socket createSocket(String host, int port) throws IOException {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 03 21:33:52 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  4. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

      @Override public MockResponse dispatch(RecordedRequest request) {
        String path = request.getPath();
        try {
          if (!path.startsWith("/") || path.contains("..")) throw new FileNotFoundException();
    
          File file = new File(root + path);
          return file.isDirectory()
              ? directoryToResponse(path, file)
              : fileToResponse(path, file);
        } catch (FileNotFoundException e) {
          return new MockResponse()
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

          val context = readFieldOrNull(sslSocketFactory, sslContextClass, "context") ?: return null
          readFieldOrNull(context, X509TrustManager::class.java, "trustManager")
        } catch (e: ClassNotFoundException) {
          null
        } catch (e: RuntimeException) {
          // Throws InaccessibleObjectException (added in JDK9) on JDK 17 due to
          // JEP 403 Strongly Encapsulate JDK Internals.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (1)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

        // If the host exactly matches, we're done: this connection can carry the address.
        if (address.url.host == this.route().address.url.host) {
          return true // This connection is a perfect match.
        }
    
        // At this point we don't have a hostname match. But we still be able to carry the request if
        // our connection coalescing requirements are met. See also:
        // https://hpbn.co/optimizing-application-delivery/#eliminate-domain-sharding
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/HttpUrlTest.kt

          .isEqualTo(parse("http://host/path"))
        assertThat(parse("http:\\\\host/path"))
          .isEqualTo(parse("http://host/path"))
        assertThat(parse("http:///host/path"))
          .isEqualTo(parse("http://host/path"))
        assertThat(parse("http:\\//host/path"))
          .isEqualTo(parse("http://host/path"))
        assertThat(parse("http:/\\/host/path"))
          .isEqualTo(parse("http://host/path"))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 67.9K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/RequestBodyTest.kt

    import java.io.FileDescriptor
    import java.io.FileInputStream
    import java.io.IOException
    import java.nio.file.Path
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.RequestBody.Companion.asRequestBody
    import okhttp3.RequestBody.Companion.toRequestBody
    import okio.Buffer
    import okio.FileSystem
    import okio.Path.Companion.toOkioPath
    import org.junit.jupiter.api.Assertions.assertThrows
    import org.junit.jupiter.api.BeforeEach
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.6K bytes
    - Viewed (1)
  9. okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt

          |
          """.trimMargin()
        try {
          decode(certificatePem)
          fail<Any>()
        } catch (expected: IllegalArgumentException) {
          assertThat(expected.message).isEqualTo("string does not include a private key")
        }
        try {
          decode(pkcs8Pem)
          fail<Any>()
        } catch (expected: IllegalArgumentException) {
          assertThat(expected.message).isEqualTo("string does not include a certificate")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/HttpUrlJvmTest.kt

      }
    
      @Test
      fun fromUriPartial() {
        val uri = URI("/path")
        assertThat(uri.toHttpUrlOrNull()).isNull()
      }
    
      @Test
      fun toJavaNetUrl() {
        val httpUrl = "http://username:password@host/path?query#fragment".toHttpUrl()
        val javaNetUrl = httpUrl.toUrl()
        assertThat(javaNetUrl.toString())
          .isEqualTo("http://username:password@host/path?query#fragment")
      }
    
      @Test
      fun toUri() {
    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)
Back to top