Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 50 for index (4.21 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/-HeadersCommon.kt

    package okhttp3.internal
    
    import okhttp3.Headers
    
    internal fun Headers.commonName(index: Int): String = namesAndValues.getOrNull(index * 2) ?: throw IndexOutOfBoundsException("name[$index]")
    
    internal fun Headers.commonValue(index: Int): String =
      namesAndValues.getOrNull(index * 2 + 1) ?: throw IndexOutOfBoundsException("value[$index]")
    
    internal fun Headers.commonValues(name: String): List<String> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/-RequestCommon.kt

      buildString {
        append("Request{method=")
        append(method)
        append(", url=")
        append(url)
        if (headers.size != 0) {
          append(", headers=[")
          headers.forEachIndexed { index, (name, value) ->
            if (index > 0) {
              append(", ")
            }
            append(name)
            append(':')
            append(if (isSensitiveHeader(name)) "██" else value)
          }
          append(']')
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

          cachedHeaders: Headers,
          networkHeaders: Headers,
        ): Headers {
          val result = Headers.Builder()
    
          for (index in 0 until cachedHeaders.size) {
            val fieldName = cachedHeaders.name(index)
            val value = cachedHeaders.value(index)
            if ("Warning".equals(fieldName, ignoreCase = true) && value.startsWith("1")) {
              // Drop 100-level freshness warnings.
              continue
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

    import okio.use
    
    // TODO: migrate callers to [Regex.matchAt] when that API is not experimental.
    internal fun Regex.matchAtPolyfill(
      input: CharSequence,
      index: Int,
    ): MatchResult? {
      val candidate = find(input, index) ?: return null
      if (candidate.range.first != index) return null // Didn't match where it should have.
      return candidate
    }
    
    @JvmField
    val EMPTY_BYTE_ARRAY: ByteArray = ByteArray(0)
    
    /** Byte order marks. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        client =
          client.newBuilder()
            .dns(FakeDns())
            .build()
        assertFailsWith<UnknownHostException> {
          getResponse(
            Request.Builder()
              .url("http://1234.1.1.1/index.html".toHttpUrl())
              .build(),
          )
        }
      }
    
      private fun testServerClosesOutput(socketPolicy: SocketPolicy) {
        server.enqueue(
          MockResponse(
    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)
  6. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

        private var index = 0
    
        fun assertLogEqual(expected: String) =
          apply {
            assertThat(index, "No more messages found")
              .isLessThan(logs.size)
            assertThat(logs[index++]).isEqualTo(expected)
            return this
          }
    
        fun assertLogMatch(regex: Regex) =
          apply {
            assertThat(index, "No more messages found")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 37.6K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/FormBody.kt

        level = DeprecationLevel.ERROR,
      )
      fun size(): Int = size
    
      fun encodedName(index: Int): String = encodedNames[index]
    
      fun name(index: Int): String = encodedName(index).percentDecode(plusIsSpace = true)
    
      fun encodedValue(index: Int): String = encodedValues[index]
    
      fun value(index: Int): String = encodedValue(index).percentDecode(plusIsSpace = true)
    
      override fun contentType(): MediaType = CONTENT_TYPE
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/http2/HpackTest.kt

        bytesIn.writeByte(0x7f) // == Bad index! ==
    
        // Indexed name (idx = 4) -> :authority
        bytesIn.writeByte(0x0f) // Literal value (len = 15)
        bytesIn.writeUtf8("www.example.com")
        assertFailsWith<IOException> {
          hpackReader!!.readHeaders()
        }.also { expected ->
          assertThat(expected.message).isEqualTo("Header index too large 78")
        }
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 38.2K bytes
    - Viewed (0)
  9. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappingTables.kt

      var index = 0
      val result = mutableListOf<Mapping>()
    
      while (index < mappings.size) {
        val mapping = mappings[index]
        val type = canonicalizeType(mapping.type)
        val mappedTo = mapping.mappedTo
    
        var unionWith: Mapping = mapping
        index++
    
        while (index < mappings.size) {
          val next = mappings[index]
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/idn/IdnaMappingTableTest.kt

        // Search for misses.
        assertEquals(-1, binarySearch(0, 6) { index -> 0.compareTo(table[index]) })
        assertEquals(-2, binarySearch(0, 6) { index -> 2.compareTo(table[index]) })
        assertEquals(-3, binarySearch(0, 6) { index -> 4.compareTo(table[index]) })
        assertEquals(-4, binarySearch(0, 6) { index -> 6.compareTo(table[index]) })
        assertEquals(-5, binarySearch(0, 6) { index -> 8.compareTo(table[index]) })
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.9K bytes
    - Viewed (0)
Back to top