Search Options

Results per page
Sort
Preferred Languages
Advance

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

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

        apply {
          encodings[ 0x0] = encoding // Null character
          encodings[ 0x1] = encoding // Start of Header
          encodings[ 0x2] = encoding // Start of Text
          encodings[ 0x3] = encoding // End of Text
          encodings[ 0x4] = encoding // End of Transmission
          encodings[ 0x5] = encoding // Enquiry
          encodings[ 0x6] = encoding // Acknowledgment
          encodings[ 0x7] = encoding // Bell
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/UrlComponentEncodingTesterJvm.kt

        codePointString: String,
        encoding: UrlComponentEncodingTester.Encoding,
        component: Component,
      ) {
        testToUrl(codePoint, encoding, component)
        testFromUrl(codePoint, encoding, component)
        testUri(codePoint, codePointString, encoding, component)
      }
    
      private fun testToUrl(
        codePoint: Int,
        encoding: UrlComponentEncodingTester.Encoding,
        component: Component,
      ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/url/-Url.kt

        if (c == '%' || c == '+' && plusIsSpace) {
          // Slow path: the character at i requires decoding!
          val out = Buffer()
          out.writeUtf8(this, pos, i)
          out.writePercentDecoded(this, pos = i, limit = limit, plusIsSpace = plusIsSpace)
          return out.readUtf8()
        }
      }
    
      // Fast path: no characters in [pos..limit) required decoding.
      return substring(pos, limit)
    }
    
    internal fun String.isPercentEncoded(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  4. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

    /**
     * Streaming decoder of data encoded following Abstract Syntax Notation One (ASN.1). There are
     * multiple variants of ASN.1, including:
     *
     *  * DER: Distinguished Encoding Rules. This further constrains ASN.1 for deterministic encoding.
     *  * BER: Basic Encoding Rules.
     *
     * This class was implemented according to the [X.690 spec][[x690]], and under the advice of
     * [Lets Encrypt's ASN.1 and DER][asn1_and_der] guide.
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java

          Request originalRequest = chain.request();
          if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) {
            return chain.proceed(originalRequest);
          }
    
          Request compressedRequest = originalRequest.newBuilder()
              .header("Content-Encoding", "gzip")
              .method(originalRequest.method(), gzip(originalRequest.body()))
              .build();
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat May 25 18:02:55 GMT 2019
    - 3.8K bytes
    - Viewed (0)
  6. samples/compare/src/test/kotlin/okhttp3/compare/OkHttpClientTest.kt

        assertThat(response.body.string()).isEqualTo("hello, OkHttp")
    
        val recorded = server.takeRequest()
        assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
        assertThat(recorded.headers["Accept-Encoding"]).isEqualTo("gzip")
        assertThat(recorded.headers["Connection"]).isEqualTo("Keep-Alive")
        assertThat(recorded.headers["User-Agent"]!!).matches(Regex("okhttp/.*"))
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/CacheTest.kt

            .addHeader("Expires: " + formatDate(-1, TimeUnit.HOURS))
            .addHeader("Content-Encoding: gzip")
            .build(),
        )
        server.enqueue(
          MockResponse.Builder()
            .code(HttpURLConnection.HTTP_NOT_MODIFIED)
            .addHeader("Content-Type: text/plain")
            .addHeader("Content-Encoding: identity")
            .build(),
        )
        server.enqueue(
          MockResponse.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
  8. okhttp-brotli/src/test/java/okhttp3/brotli/BrotliBombTest.kt

      /** https://github.com/square/okhttp/issues/7738 */
      @Test
      fun testDecompressBomb() {
        val response =
          Response.Builder()
            .code(200)
            .message("OK")
            .header("Content-Encoding", "br")
            .request(Request.Builder().url("https://example.com/").build())
            .body(readBrotli10G().toResponseBody())
            .protocol(Protocol.HTTP_2)
            .build()
    
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 29 22:50:20 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  9. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerHeader.kt

       *
       * ```
       * 0bxx0xxxxx Primitive
       * 0bxx1xxxxx Constructed
       * ```
       */
      var constructed: Boolean,
      /** Length of the message in bytes, or -1L if its length is unknown at the time of encoding. */
      var length: Long,
    ) {
      val isEndOfData: Boolean
        get() = tagClass == TAG_CLASS_UNIVERSAL && tag == TAG_END_OF_CONTENTS
    
      // Avoid Long.hashCode(long) which isn't available on Android 5.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  10. 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)
Back to top