Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for Cause (0.15 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

          }
        }
    
        return null
      }
    
      private fun <E : IOException?> timeoutExit(cause: E): E {
        if (timeoutEarlyExit) return cause
        if (!timeout.exit()) return cause
    
        val e = InterruptedIOException("timeout")
        if (cause != null) e.initCause(cause)
        @Suppress("UNCHECKED_CAST") // E is either IOException or IOException?
        return e as E
      }
    
      /**
    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)
  2. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

      fun sendFrame(): Http2Writer {
        outFrames.add(OutFrame(frameCount++, bytesOut.size, false))
        return writer
      }
    
      /**
       * Shortens the last frame from its original length to `length`. This will cause the peer to
       * close the socket as soon as this frame has been written; otherwise the peer stays open until
       * explicitly closed.
       */
      fun truncateLastFrame(length: Int): Http2Writer {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt

      private val data = Buffer()
      private val random = Random(0)
    
      /**
       * Check all data as verified inside of the test. We do this in an AfterEachCallback so that
       * exceptions thrown from the test do not cause this check to fail.
       */
      @RegisterExtension
      val noDataLeftBehind =
        AfterEachCallback { context: ExtensionContext ->
          if (context.executionException.isPresent) return@AfterEachCallback
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

        // The WHATWG Host parsing rules accepts some character codes which are invalid by
        // definition for OkHttp's host header checks (and the WHATWG Host syntax definition). Here
        // we rule out characters that would cause problems in host headers.
        if (c <= '\u001f' || c >= '\u007f') {
          return true
        }
        // Check for the characters mentioned in the WHATWG Host parsing spec:
    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)
  5. docs/changelogs/changelog_4x.md

        redirect from one hostname to another, and where both hosts had common certificates.
    
     *  Fix: Don't fail on a redirect when a client has configured a 'trust everything' trust manager.
        Typically this would cause certain redirects to fail in debug and development configurations.
    
    
    ## Version 4.4.0
    
    _2020-02-17_
    
     *  New: Support `canceled()` as an event that can be observed by `EventListener`. This should be
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

            assertThat(throwables!!.size).isEqualTo(1)
          }
        }
      }
    
      /**
       * When a pooled connection fails, don't blame the route. Otherwise pooled connection failures can
       * cause unnecessary SSL fallbacks.
       *
       * https://github.com/square/okhttp/issues/515
       */
      @Test
      fun sslFallbackNotUsedWhenRecycledConnectionFails() {
        server.useHttps(handshakeCertificates.sslSocketFactory())
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

          closeLater(ErrorCode.CANCEL)
          connection.sendDegradedPingLater()
        }
    
        override fun newTimeoutException(cause: IOException?): IOException {
          return SocketTimeoutException("timeout").apply {
            if (cause != null) {
              initCause(cause)
            }
          }
        }
    
        @Throws(IOException::class)
        fun exitAndThrowIfTimedOut() {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  8. okhttp/src/main/kotlin/okhttp3/internal/connection/RetryTlsHandshake.kt

        // ConnectionSpec: we assume it is unreachable.
        e is InterruptedIOException -> false
    
        // If the problem was a CertificateException from the X509TrustManager, do not retry.
        e is SSLHandshakeException && e.cause is CertificateException -> false
    
        // e.g. a certificate pinning error.
        e is SSLPeerUnverifiedException -> false
    
        // Retry for all other SSL failures.
        e is SSLException -> true
    
        else -> false
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Jan 07 16:05:34 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  9. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

        try {
          dns.lookup("google.com")
          fail<Any>()
        } catch (ioe: IOException) {
          assertThat(ioe.message).isEqualTo("google.com")
          val cause = ioe.cause!!
          assertThat(cause).isInstanceOf<IOException>()
          assertThat(cause).hasMessage("response size exceeds limit (65536 bytes): 65537 bytes")
        }
      }
    
      @Test
      fun failOnBadResponse() {
        server.enqueue(dnsResponse("00"))
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 11K bytes
    - Viewed (0)
  10. regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt

          assertEquals(200, response.code)
          assertEquals("h3", response.negotiatedProtocol)
          assertTrue(response.content.contains("Disallow"))
        } catch (ee: ExecutionException) {
          throw ee.cause?.cause ?: ee.cause!!
        }
      }
    
      data class Response(
        val code: Int,
        val negotiatedProtocol: String,
        val content: String,
      )
    
      private fun execute(
        engine: HttpEngine,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Mar 24 13:19:43 GMT 2024
    - 6.2K bytes
    - Viewed (0)
Back to top