Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for exhaust (0.03 sec)

  1. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

    internal const val TYPE_VALID = 6
    
    private fun BufferedSource.skipWhitespace() {
      while (!exhausted()) {
        if (buffer[0] != ' '.code.toByte()) return
        skip(1L)
      }
    }
    
    private fun BufferedSource.skipRestOfLine() {
      when (val newline = indexOf('\n'.code.toByte())) {
        -1L -> skip(buffer.size) // Exhaust this source.
        else -> skip(newline + 1)
      }
    }
    
    /**
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  2. docs/changelogs/changelog_1x.md

     * Fix: Support Shoutcast HTTP responses like `ICY 200 OK`.
     * Fix: Don't unzip if there isn't a response body.
     * Fix: Don't leak gzip streams on redirects.
     * Fix: Don't do DNS lookups on invalid hosts.
     * Fix: Exhaust the underlying stream when reading gzip streams.
     * Fix: Support the `PATCH` method.
     * Fix: Support request bodies on `DELETE` method.
     * Fix: Drop the `okhttp-protocols` module.
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 6.4K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/HttpHeaders.kt

        if (peek == null) {
          if (!exhausted()) return // Expected a token; got something else.
          result.add(Challenge(schemeName, emptyMap()))
          return
        }
    
        var eqCount = skipAll('='.code.toByte())
        val commaSuffixed = skipCommasAndWhitespace()
    
        // It's a token68 because there isn't a value after it.
        if (!commaPrefixed && (commaSuffixed || exhausted())) {
          result.add(
            Challenge(
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/MockSocketHandler.kt

        apply {
          actions += { stream ->
            if (!stream.source.exhausted()) throw AssertionError("expected exhausted")
          }
        }
    
      fun cancelStream() =
        apply {
          actions += { stream -> stream.cancel() }
        }
    
      fun requestIOException() =
        apply {
          actions += { stream ->
            try {
              stream.source.exhausted()
              throw AssertionError("expected IOException")
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RouteSelector.kt

        while (hasNextProxy()) {
          // Postponed routes are always tried last. For example, if we have 2 proxies and all the
          // routes for proxy1 should be postponed, we'll move to proxy2. Only after we've exhausted
          // all the good routes will we attempt the postponed routes.
          val proxy = nextProxy()
          for (inetSocketAddress in inetSocketAddresses) {
            val route = Route(address, proxy, inetSocketAddress)
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Oct 08 03:50:05 UTC 2025
    - 7.3K bytes
    - Viewed (2)
  6. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt

        val v1 = utf8.readDecimalLong()
        require(utf8.readByte() == '.'.code.toByte())
        val v2 = utf8.readDecimalLong()
        writeVariableLengthLong(v1 * 40 + v2)
    
        while (!utf8.exhausted()) {
          require(utf8.readByte() == '.'.code.toByte())
          val vN = utf8.readDecimalLong()
          writeVariableLengthLong(vN)
        }
      }
    
      fun writeRelativeObjectIdentifier(s: String) {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/IsProbablyUtf8.kt

     */
    internal fun BufferedSource.isProbablyUtf8(codePointLimit: Long = Long.MAX_VALUE): Boolean {
      try {
        val peek = peek()
        for (i in 0 until codePointLimit) {
          if (peek.exhausted()) {
            break
          }
          val codePoint = peek.readUtf8CodePoint()
          if (Character.isISOControl(codePoint) && !Character.isWhitespace(codePoint)) {
            return false
          }
        }
        return true
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Oct 06 22:47:06 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Dns.kt

       * connection to an address fails, OkHttp will retry the connection with the next address until
       * either a connection is made, the set of IP addresses is exhausted, or a limit is exceeded.
       */
      @Throws(UnknownHostException::class)
      fun lookup(hostname: String): List<InetAddress>
    
      companion object {
        /**
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  9. mockwebserver/src/main/kotlin/mockwebserver3/SocketEffect.kt

      ) : SocketEffect
    
      /**
       * On HTTP/2, send a [GOAWAY frame](https://tools.ietf.org/html/rfc7540#section-6.8) immediately
       * after the response and will close the connection when the client's socket is exhausted.
       *
       * On HTTP/1 this closes the socket.
       */
      public object ShutdownConnection : SocketEffect
    
      /**
       * On HTTP/2 this will send the error code on the stream.
       *
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/ResponseBodyTest.kt

      fun sourceEmpty() {
        val mediaType = if (null == null) null else "any/thing; charset=${null}".toMediaType()
        val body = "".decodeHex().toResponseBody(mediaType)
        val source = body.source()
        assertThat(source.exhausted()).isTrue()
        assertThat(source.readUtf8()).isEqualTo("")
      }
    
      @Test
      fun sourceClosesUnderlyingSource() {
        var closed = false
    
        val body: ResponseBody =
          object : ResponseBody() {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.9K bytes
    - Viewed (0)
Back to top