Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for doDisconnect (0.41 sec)

  1. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

              suppressTlsFallbackClientSocketFactory(),
              handshakeCertificates.trustManager,
            )
            .build()
        assertContent("abc", getResponse(newRequest("/")))
    
        // Give the server time to disconnect.
        Thread.sleep(500)
        assertContent("def", getResponse(newRequest("/")))
        val tlsVersions: Set<TlsVersion?> =
          EnumSet.of(
            TlsVersion.TLS_1_0,
            TlsVersion.TLS_1_2,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  2. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

      }
    
      @Disabled("Not actually failing where expected")
      @Test
      fun disconnectAtStart() {
        server.enqueue(
          MockResponse()
            .setSocketPolicy(SocketPolicy.DISCONNECT_AT_START),
        )
        server.enqueue(MockResponse()) // The jdk's HttpUrlConnection is a bastard.
        server.enqueue(MockResponse())
        try {
          server.url("/a").toUrl().openConnection().getInputStream()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  3. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/SocketPolicy.kt

     */
    package okhttp3.mockwebserver
    
    enum class SocketPolicy {
      SHUTDOWN_SERVER_AFTER_RESPONSE,
      KEEP_OPEN,
      DISCONNECT_AT_END,
      UPGRADE_TO_SSL_AT_END,
      DISCONNECT_AT_START,
      DISCONNECT_AFTER_REQUEST,
      DISCONNECT_DURING_REQUEST_BODY,
      DISCONNECT_DURING_RESPONSE_BODY,
      DO_NOT_READ_REQUEST_BODY,
      FAIL_HANDSHAKE,
      SHUTDOWN_INPUT_AT_END,
      SHUTDOWN_OUTPUT_AT_END,
      STALL_SOCKET_AT_START,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        protocol: Protocol,
        mockWebServer: MockWebServer,
      ) {
        setUp(protocol, mockWebServer)
        server.enqueue(MockResponse(body = "abc"))
        server.enqueue(MockResponse(body = "def"))
    
        // Disconnect before the stream is created. A connection is still established!
        val call1 = client.newCall(Request(server.url("/")))
        val response = call1.execute()
        call1.cancel()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  5. docs/changelogs/changelog_3x.md

    
    ## Version 3.6.0
    
    _2017-01-29_
    
     *  Fix: Don't crash with a "cache is closed" error when there is an error initializing the cache.
     *  Fix: Calling `disconnect()` on a connecting `HttpUrlConnection` could cause it to retry in an
        infinite loop! This regression was introduced in OkHttp 2.7.0.
     *  Fix: Drop cookies that contain ASCII NULL and other bad characters. Previously such cookies
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 14:55:54 GMT 2022
    - 50.8K bytes
    - Viewed (0)
  6. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt

        SocketPolicy.KEEP_OPEN -> KeepOpen
        SocketPolicy.DISCONNECT_AT_END -> DisconnectAtEnd
        SocketPolicy.DISCONNECT_AT_START -> DisconnectAtStart
        SocketPolicy.DISCONNECT_AFTER_REQUEST -> DisconnectAfterRequest
        SocketPolicy.DISCONNECT_DURING_REQUEST_BODY -> DisconnectDuringRequestBody
        SocketPolicy.DISCONNECT_DURING_RESPONSE_BODY -> DisconnectDuringResponseBody
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/EventListenerTest.kt

      }
    
      @Test
      fun responseBodyFailHttp() {
        responseBodyFail(Protocol.HTTP_1_1)
      }
    
      private fun responseBodyFail(expectedProtocol: Protocol?) {
        // Use a 2 MiB body so the disconnect won't happen until the client has read some data.
        val responseBodySize = 2 * 1024 * 1024 // 2 MiB
        server.enqueue(
          MockResponse.Builder()
            .body(Buffer().write(ByteArray(responseBodySize)))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 56.9K bytes
    - Viewed (0)
  8. mockwebserver-deprecated/api/mockwebserver.api

    	public static final field DISCONNECT_AFTER_REQUEST Lokhttp3/mockwebserver/SocketPolicy;
    	public static final field DISCONNECT_AT_END Lokhttp3/mockwebserver/SocketPolicy;
    	public static final field DISCONNECT_AT_START Lokhttp3/mockwebserver/SocketPolicy;
    	public static final field DISCONNECT_DURING_REQUEST_BODY Lokhttp3/mockwebserver/SocketPolicy;
    	public static final field DISCONNECT_DURING_RESPONSE_BODY Lokhttp3/mockwebserver/SocketPolicy;
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jul 22 12:28:51 GMT 2023
    - 10.2K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CacheTest.kt

      }
    
      @Test
      fun serverDisconnectsPrematurelyWithNoLengthHeaders() {
        // Intentionally empty. This case doesn't make sense because there's no
        // such thing as a premature disconnect when the disconnect itself
        // indicates the end of the data stream.
      }
    
      private fun testServerPrematureDisconnect(transferKind: TransferKind) {
        val mockResponse = MockResponse.Builder()
    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)
Back to top