Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for mismatch (0.16 sec)

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

        lock.assertHeld()
    
        val routeUrl = route.address.url
    
        if (url.port != routeUrl.port) {
          return false // Port mismatch.
        }
    
        if (url.host == routeUrl.host) {
          return true // Host match. The URL is supported.
        }
    
        // We have a host mismatch. But if the certificate matches, we're still good.
        return !noCoalescedConnections && handshake != null && certificateSupportHost(url, handshake!!)
    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)
  2. mockwebserver/README.md

    Dispatcher (`import okhttp3.mockwebserver.Dispatcher`) to handle requests using another policy. One natural policy is to
    dispatch on the request path.
    You can, for example, filter the request instead of using `server.enqueue()`.
    
    ```java
    final Dispatcher dispatcher = new Dispatcher() {
    
        @Override
        public MockResponse dispatch (RecordedRequest request) throws InterruptedException {
    
            switch (request.getPath()) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
  3. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        MockWebServer server = new MockWebServer();
        server.useHttps(sslContext.getSocketFactory(), false);
        server.setDispatcher(this);
        server.start(port);
      }
    
      @Override public MockResponse dispatch(RecordedRequest request) {
        String path = request.getPath();
        try {
          if (!path.startsWith("/") || path.contains("..")) throw new FileNotFoundException();
    
          File file = new File(root + path);
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Viewed (0)
  4. docs/contribute/concurrency.md

    So we have a dedicated thread for every socket that just reads frames and dispatches them.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:35:36 GMT 2022
    - 7K bytes
    - Viewed (0)
  5. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

          fail<Any>()
        } catch (expected: ConnectException) {
        }
      }
    
      @Test
      fun shutdownWhileBlockedDispatching() {
        // Enqueue a request that'll cause MockWebServer to hang on QueueDispatcher.dispatch().
        val connection = server.url("/").toUrl().openConnection() as HttpURLConnection
        connection.setReadTimeout(500)
        try {
          connection.getResponseCode()
          fail<Any>()
    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)
  6. okhttp/src/test/java/okhttp3/CallTest.kt

        val dispatcher: QueueDispatcher =
          object : QueueDispatcher() {
            override fun dispatch(request: RecordedRequest): MockResponse {
              if (peek().socketPolicy === DisconnectAfterRequest) {
                requestFinished.await()
              }
              return super.dispatch(request)
            }
          }
        dispatcher.enqueueResponse(MockResponse(body = "seed connection pool"))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  7. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/QueueDispatcher.kt

    package okhttp3.mockwebserver
    
    import mockwebserver3.QueueDispatcher
    
    class QueueDispatcher : Dispatcher() {
      internal val delegate = QueueDispatcher()
    
      @Throws(InterruptedException::class)
      override fun dispatch(request: RecordedRequest): MockResponse {
        throw UnsupportedOperationException("unexpected call")
      }
    
      override fun peek(): MockResponse {
        throw UnsupportedOperationException("unexpected call")
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Oct 18 12:55:43 GMT 2020
    - 1.3K bytes
    - Viewed (0)
  8. mockwebserver/api/mockwebserver3.api

    public abstract class mockwebserver3/Dispatcher {
    	public fun <init> ()V
    	public abstract fun dispatch (Lmockwebserver3/RecordedRequest;)Lmockwebserver3/MockResponse;
    	public fun peek ()Lmockwebserver3/MockResponse;
    	public fun shutdown ()V
    }
    
    public final class mockwebserver3/MockResponse {
    	public static final field Companion Lmockwebserver3/MockResponse$Companion;
    	public fun <init> ()V
    	public fun <init> (I)V
    	public fun <init> (ILokhttp3/Headers;)V
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 03 21:59:45 GMT 2023
    - 12.7K bytes
    - Viewed (0)
  9. kotlin-js-store/yarn.lock

    minimatch@5.0.1:
      version "5.0.1"
      resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b"
      integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==
      dependencies:
        brace-expansion "^2.0.1"
    
    minimatch@^3.0.4, minimatch@^3.1.1:
      version "3.1.2"
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jul 22 12:28:51 GMT 2023
    - 87.4K bytes
    - Viewed (0)
  10. docs/features/calls.md

    Calls can be canceled from any thread. This will fail the call if it hasn’t yet completed! Code that is writing the request body or reading the response body will suffer an `IOException` when its call is canceled.
    
    ## Dispatch
    
    For synchronous calls, you bring your own thread and are responsible for managing how many simultaneous requests you make. Too many simultaneous connections wastes resources; too few harms latency.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.9K bytes
    - Viewed (0)
Back to top