Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for HTTP_1_0 (0.07 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/StatusLine.kt

            protocol =
              when (httpMinorVersion) {
                0 -> Protocol.HTTP_1_0
                1 -> Protocol.HTTP_1_1
                else -> throw ProtocolException("Unexpected status line: $statusLine")
              }
          } else if (statusLine.startsWith("ICY ")) {
            // Shoutcast uses ICY instead of "HTTP/1.0".
            protocol = Protocol.HTTP_1_0
            codeStart = 4
          } else if (statusLine.startsWith("SOURCETABLE ")) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Protocol.kt

        @Throws(IOException::class)
        fun get(protocol: String): Protocol {
          // 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
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jun 23 18:58:57 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/ProtocolTest.kt

    import org.junit.jupiter.api.Assertions.assertThrows
    import org.junit.jupiter.api.Test
    
    class ProtocolTest {
      @Test
      fun testGetKnown() {
        assertThat(get("http/1.0")).isEqualTo(Protocol.HTTP_1_0)
        assertThat(get("http/1.1")).isEqualTo(Protocol.HTTP_1_1)
        assertThat(get("spdy/3.1")).isEqualTo(Protocol.SPDY_3)
        assertThat(get("h2")).isEqualTo(Protocol.HTTP_2)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/StatusLineTest.kt

      // https://github.com/square/okhttp/issues/386
      @Test
      fun shoutcast() {
        val statusLine = parse("ICY 200 OK")
        assertThat(statusLine.message).isEqualTo("OK")
        assertThat(statusLine.protocol).isEqualTo(Protocol.HTTP_1_0)
        assertThat(statusLine.code).isEqualTo(200)
      }
    
      @Test
      fun missingProtocol() {
        assertInvalid("")
        assertInvalid(" ")
        assertInvalid("200 OK")
        assertInvalid(" 200 OK")
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Connection.kt

      /**
       * Returns the protocol negotiated by this connection, or [Protocol.HTTP_1_1] if no protocol
       * has been negotiated. This method returns [Protocol.HTTP_1_1] even if the remote peer is using
       * [Protocol.HTTP_1_0].
       */
      fun protocol(): Protocol
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/platform/Platform.kt

          this.platform = platform
          PublicSuffixDatabase.resetForTests()
        }
    
        fun alpnProtocolNames(protocols: List<Protocol>) = protocols.filter { it != Protocol.HTTP_1_0 }.map { it.toString() }
    
        val isAndroid: Boolean
          get() = PlatformRegistry.isAndroid
    
        /** Attempt to match the host runtime to a capable Platform implementation. */
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 07:33:49 UTC 2025
    - 8.1K bytes
    - Viewed (0)
Back to top