Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 114 for length (0.17 sec)

  1. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/BasicDerAdapter.kt

        result = 31 * result + (if (typeHint) 1 else 0)
        return result
      }
    
      override fun toString(): String = "$name [$tagClass/$tag]"
    
      /** Reads and writes values without knowledge of the enclosing tag, length, or defaults. */
      interface Codec<T> {
        fun decode(reader: DerReader): T
    
        fun encode(
          writer: DerWriter,
          value: T,
        )
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  2. docs/changelogs/changelog_1x.md

     * Support asynchronous disconnects by breaking the socket only. This should
       prevent flakiness from multiple threads concurrently accessing a stream.
    
    ## Version 1.5.3
    
    _2014-03-29_
    
     * Fix bug where the Content-Length header was not always dropped when
       following a redirect from a POST to a GET.
     * Implement basic support for `Thread.interrupt()`. OkHttp now checks
       for an interruption before doing a blocking call. If it is interrupted,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 6.4K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/platform/android/AndroidLog.kt

          // Split by line, then ensure each line can fit into Log's maximum length.
          var i = 0
          val length = logMessage.length
          while (i < length) {
            var newline = logMessage.indexOf('\n', i)
            newline = if (newline != -1) newline else length
            do {
              val end = minOf(newline, i + MAX_LOG_LENGTH)
              Log.println(logLevel, tag, logMessage.substring(i, end))
              i = end
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  4. docs/features/calls.md

    the request at a high-level: _“fetch me this URL with these headers.”_ For correctness and efficiency, OkHttp rewrites your request before transmitting it.
    
    OkHttp may add headers that are absent from the original request, including `Content-Length`, `Transfer-Encoding`, `User-Agent`, `Host`, `Connection`, and `Content-Type`. It will add an `Accept-Encoding` header for transparent response compression unless the header is already present. If you’ve got cookies, OkHttp will add a `Cookie` header...
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/CacheCorruptionTest.kt

      }
    
      @Test
      fun truncatedMetadataEntry() {
        val response =
          testCorruptingCache {
            corruptMetadata {
              // truncate metadata to 1/4 of length
              it.substring(0, it.length / 4)
            }
          }
    
        assertThat(response.body.string()).isEqualTo("ABC.2") // not cached
        assertThat(cache.requestCount()).isEqualTo(2)
        assertThat(cache.networkCount()).isEqualTo(2)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 6K bytes
    - Viewed (1)
  6. samples/guide/src/main/java/okhttp3/recipes/CustomCipherSuites.java

            TrustManagerFactory.getDefaultAlgorithm());
        trustManagerFactory.init((KeyStore) null);
        TrustManager[] trustManagers = trustManagerFactory.getTrustManagers();
        if (trustManagers.length != 1 || !(trustManagers[0] instanceof X509TrustManager)) {
          throw new IllegalStateException("Unexpected default trust managers:"
              + Arrays.toString(trustManagers));
        }
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Mar 14 21:57:42 GMT 2019
    - 6.5K bytes
    - Viewed (0)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

          }
    
        // Read the length.
        val length0 = source.readByte().toInt() and 0xff
        val length =
          when {
            length0 == 0b1000_0000 -> {
              throw ProtocolException("indefinite length not permitted for DER")
            }
            (length0 and 0b1000_0000) == 0b1000_0000 -> {
              // Length specified over multiple bytes.
              val lengthBytes = length0 and 0b0111_1111
    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)
  8. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketExtensions.kt

              continue // Not a header we're interested in.
            }
            val header = responseHeaders.value(i)
    
            // Parse each extension.
            var pos = 0
            while (pos < header.length) {
              val extensionEnd = header.delimiterOffset(',', pos)
              val extensionTokenEnd = header.delimiterOffset(';', pos, extensionEnd)
              val extensionToken = header.trimSubstring(pos, extensionTokenEnd)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  9. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

              val bytes = reader.readUnknown()
              return AnyValue(
                tagClass = header.tagClass,
                tag = header.tag,
                constructed = header.constructed,
                length = header.length,
                bytes = bytes,
              )
            }
          }
    
          override fun toDer(
            writer: DerWriter,
            value: AnyValue,
          ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/MultipartBody.kt

      }
    
      /**
       * Either writes this request to [sink] or measures its content length. We have one method do
       * double-duty to make sure the counting and content are consistent, particularly when it comes
       * to awkward operations like measuring the encoded length of header strings, or the
       * length-in-digits of an encoded integer.
       */
      @Throws(IOException::class)
      private fun writeOrCountBytes(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.9K bytes
    - Viewed (0)
Back to top