Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for addLenient (0.08 sec)

  1. okhttp/src/main/kotlin/okhttp3/Headers.kt

         * Add a header line without any validation. Only appropriate for headers from the remote peer
         * or cache.
         */
        internal fun addLenient(line: String) =
          apply {
            val index = line.indexOf(':', 1)
            when {
              index != -1 -> {
                addLenient(line.substring(0, index), line.substring(index + 1))
              }
              line[0] == ':' -> {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/internal.kt

    internal fun addHeaderLenient(
      builder: Headers.Builder,
      line: String,
    ): Headers.Builder = builder.addLenient(line)
    
    internal fun addHeaderLenient(
      builder: Headers.Builder,
      name: String,
      value: String,
    ): Headers.Builder = builder.addLenient(name, value)
    
    internal fun cacheGet(
      cache: Cache,
      request: Request,
    ): Response? = cache.get(request)
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http1/HeadersReader.kt

      }
    
      /** Reads headers or trailers. */
      fun readHeaders(): Headers {
        val result = Headers.Builder()
        while (true) {
          val line = readLine()
          if (line.isEmpty()) break
          result.addLenient(line)
        }
        return result.build()
      }
    
      companion object {
        private const val HEADER_LIMIT = 256 * 1024
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Dec 20 23:27:07 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

              networkHeaders[fieldName] == null
            ) {
              result.addLenient(fieldName, value)
            }
          }
    
          for (index in 0 until networkHeaders.size) {
            val fieldName = networkHeaders.name(index)
            if (!isContentSpecificHeader(fieldName) && isEndToEnd(fieldName)) {
              result.addLenient(fieldName, networkHeaders.value(index))
            }
          }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Mar 22 07:09:21 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2ExchangeCodec.kt

            if (name == RESPONSE_STATUS_UTF8) {
              statusLine = StatusLine.parse("HTTP/1.1 $value")
            } else if (name !in HTTP_2_SKIPPED_RESPONSE_HEADERS) {
              headersBuilder.addLenient(name, value)
            }
          }
          if (statusLine == null) throw ProtocolException("Expected ':status' header not present")
    
          return Response.Builder()
            .protocol(protocol)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/Cache.kt

            val varyHeadersBuilder = Headers.Builder()
            val varyRequestHeaderLineCount = readInt(source)
            for (i in 0 until varyRequestHeaderLineCount) {
              varyHeadersBuilder.addLenient(source.readUtf8LineStrict())
            }
            varyHeaders = varyHeadersBuilder.build()
    
            val statusLine = StatusLine.parse(source.readUtf8LineStrict())
            protocol = statusLine.protocol
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt

            }
    
            else -> return CacheStrategy(request, null) // No condition! Make a regular request.
          }
    
          val conditionalRequestHeaders = request.headers.newBuilder()
          conditionalRequestHeaders.addLenient(conditionName, conditionValue!!)
    
          val conditionalRequest =
            request.newBuilder()
              .headers(conditionalRequestHeaders.build())
              .build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 13:24:48 UTC 2024
    - 12K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

      return millis.toInt()
    }
    
    internal fun List<Header>.toHeaders(): Headers {
      val builder = Headers.Builder()
      for ((name, value) in this) {
        builder.addLenient(name.utf8(), value.utf8())
      }
      return builder.build()
    }
    
    internal fun Headers.toHeaderList(): List<Header> =
      (0 until size).map {
        Header(name(it), value(it))
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon May 13 13:42:37 UTC 2024
    - 10.7K bytes
    - Viewed (0)
Back to top