Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 323 for if (0.42 sec)

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

          if (i == limit) break
        } else if (b != 0) {
          // Group separator ":" delimiter.
          if (input.startsWith(":", startIndex = i)) {
            i++
          } else if (input.startsWith(".", startIndex = i)) {
            // If we see a '.', rewind to the beginning of the previous group and parse as IPv4.
            if (!decodeIpv4Suffix(input, groupOffset, limit, address, b - 2)) return null
    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)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

        this.withLock {
          if (requestDone && requestBodyOpen || responseDone && responseBodyOpen) {
            if (requestDone) requestBodyOpen = false
            if (responseDone) responseBodyOpen = false
            bothStreamsDone = !requestBodyOpen && !responseBodyOpen
            callDone = !requestBodyOpen && !responseBodyOpen && !expectMoreExchanges
          }
        }
    
        if (bothStreamsDone) {
          this.exchange = null
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  3. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

          if (!logHeaders && requestBody != null) {
            requestStartMessage += " (${requestBody.contentLength()}-byte body)"
          }
          logger.log(requestStartMessage)
    
          if (logHeaders) {
            val headers = request.headers
    
            if (requestBody != null) {
              // Request body headers are only present when installed as a network interceptor. When not
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  4. okhttp/src/main/kotlin/okhttp3/internal/idn/Punycode.kt

        val result = Buffer()
    
        while (pos < limit) {
          var dot = string.indexOf('.', startIndex = pos)
          if (dot == -1) dot = limit
    
          if (!encodeLabel(string, pos, dot, result)) {
            // If we couldn't encode the label, give up.
            return null
          }
    
          if (dot < limit) {
            result.writeByte('.'.code)
            pos = dot + 1
          } else {
            break
          }
        }
    
    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)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

        // If the non-host fields of the address don't overlap, we're done.
        if (!this.route.address.equalsNonHost(address)) return false
    
        // If the host exactly matches, we're done: this connection can carry the address.
        if (address.url.host == this.route().address.url.host) {
          return true // This connection is a perfect match.
        }
    
        // At this point we don't have a hostname match. But we still be able to carry the request if
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

              while (true) {
                val upstreamPos = ******@****.***amPos
                if (sourcePos != upstreamPos) break
    
                // No more data upstream. We're done.
                if (complete) return -1L
    
                // Another thread is already reading. Wait for that.
                if (upstreamReader != null) {
                  timeout.waitUntilNotified(this@Relay)
                  continue
                }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

            if (conscrypt != null) {
              return conscrypt
            }
          }
    
          if (isBouncyCastlePreferred) {
            val bc = BouncyCastlePlatform.buildIfSupported()
    
            if (bc != null) {
              return bc
            }
          }
    
          if (isOpenJSSEPreferred) {
            val openJSSE = OpenJSSEPlatform.buildIfSupported()
    
            if (openJSSE != null) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (1)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

        val result = eventSequence.remove()
        val actualElapsedNs = result.timestampNs - (lastTimestampNs ?: result.timestampNs)
        lastTimestampNs = result.timestampNs
    
        if (eventClass != null) {
          assertThat(result).isInstanceOf(eventClass)
        }
    
        if (elapsedMs != -1L) {
          assertThat(
            TimeUnit.NANOSECONDS.toMillis(actualElapsedNs)
              .toDouble(),
          )
            .isCloseTo(elapsedMs.toDouble(), 100.0)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  9. okhttp-java-net-cookiejar/src/main/kotlin/okhttp3/java/net/cookiejar/JavaNetCookieJar.kt

        for ((key, value) in cookieHeaders) {
          if (("Cookie".equals(key, ignoreCase = true) || "Cookie2".equals(key, ignoreCase = true)) &&
            value.isNotEmpty()
          ) {
            for (header in value) {
              if (cookies == null) cookies = mutableListOf()
              cookies.addAll(decodeHeaderAsJavaNetCookies(url, header))
            }
          }
        }
    
        return if (cookies != null) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:10:43 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  10. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

     */
    internal interface DerAdapter<T> {
      /** Returns true if this adapter can read [header] in a choice. */
      fun matches(header: DerHeader): Boolean
    
      /**
       * Returns a value from this adapter.
       *
       * This must always return a value, though it doesn't necessarily need to consume data from
       * [reader]. For example, if the reader's peeked tag isn't readable by this adapter, it may return
       * a default value.
    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