Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for HTTP_1_1 (3.1 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/TrailersTest.kt

      ) = apply {
        when (protocol) {
          Protocol.HTTP_1_1 -> chunkedBody(body, 1024) // Force multiple chunks.
          else -> body(body)
        }
      }
    
      private fun enableProtocol(protocol: Protocol) {
        if (protocol == Protocol.HTTP_2) {
          enableTls()
          client =
            client
              .newBuilder()
              .protocols(listOf(protocol, Protocol.HTTP_1_1))
              .build()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 07 18:57:05 UTC 2025
    - 18K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/OkHttpClientTest.kt

            .Builder()
            .protocols(nullHostileProtocols)
            .build()
        assertEquals(
          listOf(Protocol.HTTP_1_1),
          client.protocols,
        )
      }
    
      @Test fun nullProtocolInList() {
        val protocols =
          mutableListOf(
            Protocol.HTTP_1_1,
            null,
          )
        assertFailsWith<IllegalArgumentException> {
          OkHttpClient
            .Builder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 13.4K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt

        enableTlsWithTunnel()
        server.protocols = Arrays.asList(Protocol.HTTP_1_1)
        responseBodyFail(Protocol.HTTP_1_1)
      }
    
      @Test
      fun responseBodyFailHttp2OverHttps() {
        platform.assumeHttp2Support()
        enableTlsWithTunnel()
        server.protocols = Arrays.asList(Protocol.HTTP_2, Protocol.HTTP_1_1)
        responseBodyFail(Protocol.HTTP_2)
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 60.4K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Protocol.kt

          // Unroll the loop over values() to save an allocation.
          @Suppress("DEPRECATION")
          return when (protocol) {
            HTTP_1_0.protocol -> HTTP_1_0
            HTTP_1_1.protocol -> HTTP_1_1
            H2_PRIOR_KNOWLEDGE.protocol -> H2_PRIOR_KNOWLEDGE
            HTTP_2.protocol -> HTTP_2
            SPDY_3.protocol -> SPDY_3
            QUIC.protocol -> QUIC
            else -> {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jun 23 18:58:57 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/ServerTruncatesRequestTest.kt

        }
      }
    
      @Disabled("Follow up with fix in https://github.com/square/okhttp/issues/6853")
      @Test
      fun serverDisconnectsBeforeSecondRequestHttp1() {
        enableProtocol(Protocol.HTTP_1_1)
    
        server.enqueue(MockResponse(code = 200, body = "Req1"))
        server.enqueue(MockResponse(code = 200, body = "Req2"))
    
        val eventListener =
          object : EventListener() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 9.4K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/SocketChannelTest.kt

                  sslSocketFactory,
                  handshakeCertificates.trustManager,
                )
    
                when (socketMode.protocol) {
                  HTTP_2 -> protocols(listOf(HTTP_2, HTTP_1_1))
                  HTTP_1_1 -> protocols(listOf(HTTP_1_1))
                  else -> TODO()
                }
    
                val serverSslSocketFactory =
                  object : DelegatingSSLSocketFactory(sslSocketFactory) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 8K bytes
    - Viewed (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

       * must contain [Protocol.HTTP_1_1]. It must not contain null.
       *
       * This list is ignored when [negotiation is disabled][protocolNegotiationEnabled].
       */
      public var protocols: List<Protocol> = immutableListOf(Protocol.HTTP_2, Protocol.HTTP_1_1)
        set(value) {
          val protocolList = value.toImmutableList()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 20:36:00 UTC 2025
    - 40.3K bytes
    - Viewed (0)
  8. okhttp/src/commonTest/kotlin/okhttp3/CompressionInterceptorTest.kt

            .addInterceptor { chain ->
              assertThat(chain.request().header("Accept-Encoding")).isNull()
              Response
                .Builder()
                .request(chain.request())
                .protocol(Protocol.HTTP_1_1)
                .code(200)
                .message("OK")
                .body("Hello".toResponseBody())
                .header("Content-Encoding", "piedpiper")
                .build()
            }.build()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Aug 01 06:04:22 UTC 2025
    - 3K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionReuseTest.kt

          response!!.closeQuietly()
        }
      }
    
      private fun enableHttps() {
        enableHttpsAndAlpn(Protocol.HTTP_1_1)
      }
    
      private fun enableHttp2() {
        platform.assumeHttp2Support()
        enableHttpsAndAlpn(Protocol.HTTP_2, Protocol.HTTP_1_1)
      }
    
      private fun enableHttpsAndAlpn(vararg protocols: Protocol) {
        client =
          client
            .newBuilder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 12.2K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/HttpUpgradesTest.kt

                assertThat(source.exhausted()).isTrue()
              }
            }
            socketHandler.awaitSuccess()
          }
      }
    
      @Test
      fun upgradeHttps() {
        enableTls(Protocol.HTTP_1_1)
        upgrade()
      }
    
      @Test
      fun upgradeRefusedByServer() {
        server.enqueue(MockResponse(body = "normal request"))
        val requestWithUpgrade =
          Request
            .Builder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 7.1K bytes
    - Viewed (0)
Back to top