Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 48 for decoder (0.16 sec)

  1. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackRoundTripTest.kt

    import org.junit.jupiter.params.provider.ArgumentsSource
    
    /**
     * Tests for round-tripping headers through hpack.
     *
     * TODO: update hpack-test-case with the output of our encoder.
     * This test will hide complementary bugs in the encoder and decoder,
     * We should test that the encoder is producing responses that are
     */
    class HpackRoundTripTest : HpackDecodeTestBase() {
      internal class StoriesTestProvider : SimpleProvider() {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/idn/Punycode.kt

        return result.readUtf8()
      }
    
      /**
       * Converts a single label from Punycode to Unicode.
       *
       * @return true if the range of [string] from [pos] to [limit] was valid and decoded successfully.
       *     Otherwise, the decode failed.
       */
      private fun decodeLabel(
        string: String,
        pos: Int,
        limit: Int,
        result: Buffer,
      ): Boolean {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 03 03:04:50 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  3. docs/changelogs/changelog_4x.md

        above. See [Jetty's overview][jetty_8_252] of the API change and its consequences.
    
     *  New: `MultipartReader` is a streaming decoder for [MIME multipart (RFC 2045)][rfc_2045]
        messages. It complements `MultipartBody` which is our streaming encoder.
    
        ```kotlin
        val response: Response = call.execute()
        val multipartReader = MultipartReader(response.body!!)
    
        multipartReader.use {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  4. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

    package okhttp3.dnsoverhttps
    
    import java.io.EOFException
    import java.net.InetAddress
    import java.net.UnknownHostException
    import okio.Buffer
    import okio.ByteString
    import okio.utf8Size
    
    /**
     * Trivial Dns Encoder/Decoder, basically ripped from Netty full implementation.
     */
    internal object DnsRecordCodec {
      private const val SERVFAIL = 2
      private const val NXDOMAIN = 3
      const val TYPE_A = 0x0001
      const val TYPE_AAAA = 0x001c
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

      val normalized = normalizeNfc(bufferB.readUtf8())
      bufferA.writeUtf8(normalized)
    
      // 3. For each label, convert/validate Punycode.
      val decoded = Punycode.decode(bufferA.readUtf8()) ?: return null
    
      // 4.1 Validate.
    
      // Must be NFC.
      if (decoded != normalizeNfc(decoded)) return null
    
      // TODO: Must not begin with a combining mark.
      // TODO: Each character must be 'valid' or 'deviation'. Not mapped.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/idn/PunycodeTest.kt

        assertNull(Punycode.decode("xn--a-9b.net"))
        assertEquals("a՚.net", Punycode.decode("xn--a-99b.net"))
        assertEquals("a溠.net", Punycode.decode("xn--a-999b.net"))
        assertEquals("a\uD8E2\uDF5C.net", Punycode.decode("xn--a-9999b.net"))
        assertNull(Punycode.decode("xn--a-99999b.net"))
      }
    
      @Test fun dashInPrefix() {
        testEncodeDecode(
          unicode = "klmnöpqrst-uvwxy",
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

    import java.net.ProtocolException
    import okio.Buffer
    import okio.BufferedSource
    import okio.ByteString
    import okio.ForwardingSource
    import okio.Source
    import okio.buffer
    
    /**
     * 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.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  8. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

      }
    
      @Test fun `cannot decode malformed utc time`() {
        val bytes = "170d3139313231362333303231305a".decodeHex()
        assertFailsWith<ProtocolException> {
          Adapters.UTC_TIME.fromDer(bytes)
        }.also { expected ->
          assertThat(expected).hasMessage("Failed to parse UTCTime 191216#30210Z")
        }
      }
    
      @Test fun `cannot decode generalized time with offset`() {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  9. okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt

          |-----END PRIVATE KEY-----
          |
          """.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) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (0)
  10. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.tls.internal.der
    
    import okio.Buffer
    import okio.ByteString
    
    /**
     * Encode and decode a model object like a [Long] or [Certificate] as DER bytes.
     */
    internal interface DerAdapter<T> {
      /** Returns true if this adapter can read [header] in a choice. */
      fun matches(header: DerHeader): Boolean
    
      /**
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
Back to top