Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for location (0.31 sec)

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

            headers =
              headersOf(
                "Location",
                "/b",
                "Test",
                "Redirect from /a to /b",
              ),
            body = "/a has moved!",
          ),
        )
        server.enqueue(
          MockResponse(
            code = 302,
            headers =
              headersOf(
                "Location",
                "/c",
                "Test",
    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)
  2. okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

        method: String,
      ): Request? {
        // Does the client allow redirects?
        if (!client.followRedirects) return null
    
        val location = userResponse.header("Location") ?: return null
        // Don't follow redirects to unsupported protocols.
        val url = userResponse.request.url.resolve(location) ?: return null
    
        // If configured, don't follow redirects between SSL and non-SSL.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12.1K bytes
    - Viewed (4)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

        this.allocationLimit = Http2Connection.DEFAULT_SETTINGS.getMaxConcurrentStreams()
        http2Connection.start()
      }
    
      /**
       * Returns true if this connection can carry a stream allocation to `address`. If non-null
       * `route` is the resolved route for a connection.
       */
      internal fun isEligible(
        address: Address,
        routes: List<Route>?,
      ): Boolean {
        lock.assertHeld()
    
    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/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

            headers = headersOf("Location", "/foo"),
            body = "This page has moved!",
          ),
        )
        server.enqueue(MockResponse(body = "This is the new location!"))
        val call = client.newCall(Request(server.url("/")))
        val response = call.execute()
        assertThat(response.body.string()).isEqualTo("This is the new location!")
        val request1 = server.takeRequest()
    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. okhttp/src/test/java/okhttp3/CacheTest.kt

            .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS))
            .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS))
            .code(HttpURLConnection.HTTP_MOVED_PERM)
            .addHeader("Location: /foo")
            .build(),
        )
        server.enqueue(
          MockResponse.Builder()
            .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS))
    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)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

              "Did you forget to close a response body?"
          Platform.get().logCloseableLeak(message, callReference.callStackTrace)
    
          references.removeAt(i)
    
          // If this was the last allocation, the connection is eligible for immediate eviction.
          if (references.isEmpty()) {
            connection.idleAtNs = now - keepAliveDurationNs
            return 0
          }
        }
    
        return references.size
    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)
  7. okhttp/src/main/kotlin/okhttp3/Protocol.kt

         *
         * @throws IOException if `protocol` is unknown.
         */
        @JvmStatic
        @Throws(IOException::class)
        fun get(protocol: String): Protocol {
          // Unroll the loop over values() to save an allocation.
          @Suppress("DEPRECATION")
          return when (protocol) {
            HTTP_1_0.protocol -> HTTP_1_0
            HTTP_1_1.protocol -> HTTP_1_1
            H2_PRIOR_KNOWLEDGE.protocol -> H2_PRIOR_KNOWLEDGE
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:17:33 GMT 2024
    - 4.4K bytes
    - Viewed (0)
Back to top