Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 53 for if (0.21 sec)

  1. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  2. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  3. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  4. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:10:43 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

        for (i in 0 until frameCount) {
          if (nextOutFrame == null && outFramesIterator.hasNext()) {
            nextOutFrame = outFramesIterator.next()
          }
    
          if (nextOutFrame != null && nextOutFrame.sequence == i) {
            val start = nextOutFrame.start
            var truncated: Boolean
            var end: Long
            if (outFramesIterator.hasNext()) {
              nextOutFrame = outFramesIterator.next()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  6. docs/changelogs/changelog_4x.md

    ## Version 4.11.0
    
    _2023-04-22_
    
     *  Fix: Don't fail the call when the response code is ‘HTTP 102 Processing’ or
        ‘HTTP 103 Early Hints’.
     *  Fix: Read the response even if writing the request fails. This means you'll get a proper HTTP
        response even if the server rejects your request body.
     *  Fix: Use literal IP addresses directly rather than passing them to `DnsOverHttps`.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.kt

            }
          }
    
          ImportResults(sortedRules, sortedExceptionRules, totalRuleBytes, totalExceptionRuleBytes)
        }
    
      private fun String.toRule(): ByteString? {
        if (trim { it <= ' ' }.isEmpty() || startsWith("//")) return null
        if (contains(WILDCARD_CHAR)) {
          assertWildcardRule(this)
        }
        return encodeUtf8()
      }
    
      data class ImportResults(
        val sortedRules: SortedSet<ByteString>,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 6K bytes
    - Viewed (0)
  8. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt

      @JvmStatic
      fun createFactory(callFactory: Call.Factory): EventSource.Factory {
        return EventSource.Factory { request, listener ->
          val actualRequest =
            if (request.header("Accept") == null) {
              request.newBuilder().addHeader("Accept", "text/event-stream").build()
            } else {
              request
            }
    
          RealEventSource(actualRequest, listener).apply {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:18:15 GMT 2024
    - 1.6K bytes
    - Viewed (1)
  9. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

            if (errorCode != null) {
              return false
            }
            if ((source.finished || source.closed) &&
              (sink.finished || sink.closed) &&
              hasResponseHeaders
            ) {
              return false
            }
            return true
          }
        }
    
      /** Returns true if this stream was created by this peer. */
      val isLocallyInitiated: Boolean
        get() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

            // If the connection is in use, keep searching.
            if (pruneAndGetAllocationCount(connection, now) > 0) {
              inUseConnectionCount++
              return@withLock
            }
    
            val idleAtNs = connection.idleAtNs
    
            if (idleAtNs < earliestOldIdleAtNs) {
              earliestOldIdleAtNs = idleAtNs
              earliestOldConnection = connection
            }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
Back to top