Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 73 for if (0.15 sec)

  1. 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)
  2. 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)
  3. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt

     * for conditional GETs) or warnings to the cached response (if the cached data is potentially
     * stale).
     */
    class CacheStrategy internal constructor(
      /** The request to send on the network, or null if this call doesn't use the network. */
      val networkRequest: Request?,
      /** The cached response to return or validate; or null if this call doesn't use a cache. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

          if (response.socketPolicy === DisconnectAfterRequest) {
            socket.close()
            return false
          }
          if (response.socketPolicy === HalfCloseAfterRequest) {
            socket.shutdownOutput()
            return false
          }
          if (response.socketPolicy === NoResponse) {
            // This read should block until the socket is closed. (Because nobody is writing.)
            if (source.exhausted()) return false
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  5. okcurl/src/main/kotlin/okhttp3/curl/logging/LoggingUtil.kt

        private val activeLoggers = mutableListOf<Logger>()
    
        fun configureLogging(
          debug: Boolean,
          showHttp2Frames: Boolean,
          sslDebug: Boolean,
        ) {
          if (debug || showHttp2Frames || sslDebug) {
            if (sslDebug) {
              System.setProperty("javax.net.debug", "")
            }
            LogManager.getLogManager().reset()
            val handler =
              object : ConsoleHandler() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.7K bytes
    - Viewed (1)
  6. okhttp/src/test/java/okhttp3/CacheTest.kt

            MockResponse.Builder()
              .addHeader("ETag: v1")
              .build(),
          )
        assertThat(conditionalRequest.headers["If-None-Match"]).isEqualTo("v1")
      }
    
      /** If both If-Modified-Since and If-None-Match conditions apply, send only If-None-Match.  */
      @Test
      fun etagAndExpirationDateInThePast() {
        val lastModifiedDate = formatDate(-2, TimeUnit.HOURS)
        val conditionalRequest =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/connection/RouteDatabase.kt

     */
    package okhttp3.internal.connection
    
    import okhttp3.Route
    
    /**
     * A denylist of failed routes to avoid when creating a new connection to a target address. This is
     * used so that OkHttp can learn from its mistakes: if there was a failure attempting to connect to
     * a specific IP address or proxy server, that failure is remembered and alternate routes are
     * preferred.
     */
    class RouteDatabase {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/CheckHandshake.java

        @Override public Response intercept(Chain chain) throws IOException {
          for (Certificate certificate : chain.connection().handshake().peerCertificates()) {
            String pin = CertificatePinner.pin(certificate);
            if (denylist.contains(pin)) {
              throw new IOException("Denylisted peer certificate: " + pin);
            }
          }
          return chain.proceed(chain.request());
        }
      };
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/idn/IdnaMappingTable.kt

     */
    internal class IdnaMappingTable internal constructor(
      val sections: String,
      val ranges: String,
      val mappings: String,
    ) {
      /**
       * Returns true if the [codePoint] was applied successfully. Returns false if it was disallowed.
       */
      fun map(
        codePoint: Int,
        sink: BufferedSink,
      ): Boolean {
        val sectionsIndex = findSectionsIndex(codePoint)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Apr 02 11:39:58 GMT 2024
    - 9K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilJvm.kt

          box.write(buffer, 1)
          result.write(box.copy(), 1)
        }
        return result
      }
    
      tailrec fun File.isDescendentOf(directory: File): Boolean {
        val parentFile = parentFile ?: return false
        if (parentFile == directory) return true
        return parentFile.isDescendentOf(directory)
      }
    
      /**
       * See FinalizationTester for discussion on how to best trigger GC in tests.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 4.3K bytes
    - Viewed (0)
Back to top