Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 82 for encoding (0.19 sec)

  1. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

            .clearHeaders()
            .addHeader("Transfer-encoding: chunked")
            .build(),
        )
        getResponse(newRequest("/")).use { response -> assertContent("ABCDE", response) }
      }
    
      @Test
      fun missingChunkBody() {
        server.enqueue(
          MockResponse.Builder()
            .body("5")
            .clearHeaders()
            .addHeader("Transfer-encoding: chunked")
            .socketPolicy(DisconnectAtEnd)
    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)
  2. okhttp/src/test/java/okhttp3/HttpUrlTest.kt

        UrlComponentEncodingTester.newInstance()
          .nonPrintableAscii(Encoding.FORBIDDEN)
          .nonAscii(Encoding.PUNYCODE)
          .override(
            Encoding.FORBIDDEN,
            '\t'.code,
            '\n'.code,
            '\u000c'.code,
            '\r'.code,
            ' '.code,
          )
          .override(
            Encoding.FORBIDDEN,
            '#'.code,
            '%'.code,
            '/'.code,
    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)
  3. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

            } else {
              var buffer = Buffer()
              requestBody.writeTo(buffer)
    
              var gzippedLength: Long? = null
              if ("gzip".equals(headers["Content-Encoding"], ignoreCase = true)) {
                gzippedLength = buffer.size
                GzipSource(buffer).use { gzippedResponseBody ->
                  buffer = Buffer()
                  buffer.writeAll(gzippedResponseBody)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  4. samples/compare/src/test/kotlin/okhttp3/compare/ApacheHttpClientTest.kt

        }
    
        val recorded = server.takeRequest()
        assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
        assertThat(recorded.headers["Accept-Encoding"]).isEqualTo("gzip, x-gzip, deflate")
        assertThat(recorded.headers["Connection"]).isEqualTo("keep-alive")
        assertThat(recorded.headers["User-Agent"]!!).startsWith("Apache-HttpClient/")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  5. samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt

        assertThat(response.body()).isEqualTo("hello, Java HTTP Client")
    
        val recorded = server.takeRequest()
        assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
        assertThat(recorded.headers["Accept-Encoding"]).isNull() // No built-in gzip.
        assertThat(recorded.headers["Connection"]).isEqualTo("Upgrade, HTTP2-Settings")
        if (PlatformVersion.majorVersion < 19) {
          assertThat(recorded.headers["Content-Length"]).isEqualTo("0")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/http/BridgeInterceptor.kt

        }
    
        // If we add an "Accept-Encoding: gzip" header field we're responsible for also decompressing
        // the transfer stream.
        var transparentGzip = false
        if (userRequest.header("Accept-Encoding") == null && userRequest.header("Range") == null) {
          transparentGzip = true
          requestBuilder.header("Accept-Encoding", "gzip")
        }
    
        val cookies = cookieJar.loadForRequest(userRequest.url)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (2)
  7. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2ExchangeCodec.kt

        private const val HOST = "host"
        private const val KEEP_ALIVE = "keep-alive"
        private const val PROXY_CONNECTION = "proxy-connection"
        private const val TRANSFER_ENCODING = "transfer-encoding"
        private const val TE = "te"
        private const val ENCODING = "encoding"
        private const val UPGRADE = "upgrade"
    
        /** See http://tools.ietf.org/html/draft-ietf-httpbis-http2-09#section-8.1.3. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  8. okhttp-brotli/src/main/kotlin/okhttp3/brotli/BrotliInterceptor.kt

    /**
     * Transparent Brotli response support.
     *
     * Adds Accept-Encoding: br to request and checks (and strips) for Content-Encoding: br in
     * responses.  n.b. this replaces the transparent gzip compression in BridgeInterceptor.
     */
    object BrotliInterceptor : Interceptor {
      override fun intercept(chain: Interceptor.Chain): Response {
        return if (chain.request().header("Accept-Encoding") == null) {
          val request =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  9. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

        val derReader = DerReader(buffer)
    
        assertFailsWith<ProtocolException> {
          derReader.read("test") {}
        }.also { expected ->
          assertThat(expected.message).isEqualTo("invalid encoding for length")
        }
      }
    
      @Test fun `decode length not encoded in shortest form possible`() {
        val buffer =
          Buffer()
            .writeByte(0b00000010)
            .writeByte(0b10000001)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

        .writeDecimalLong((address[3] and 0xff).toLong())
        .readUtf8()
    }
    
    /**
     * If this is an IP address, this returns the IP address in canonical form.
     *
     * Otherwise, this performs IDN ToASCII encoding and canonicalize the result to lowercase. For
     * example this converts `☃.net` to `xn--n3h.net`, and `WwW.GoOgLe.cOm` to `www.google.com`.
     * `null` will be returned if the host cannot be ToASCII encoded or if the result contains
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
Back to top