Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for Rashed (0.21 sec)

  1. docs/changelogs/changelog_4x.md

        could use new flow control capacity before acknowledging it, causing strict HTTP/2 servers to
        fail the call.
    
    
    ## Version 4.1.1
    
    _2019-09-05_
    
     *  Fix: Don't drop repeated headers when validating cached responses. In our Kotlin upgrade we
        introduced a regression where we iterated the number of unique header names rather than then
        number of unique headers. If you're using OkHttp's response cache this may impact you.
    
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt

         * first initiated.
         */
        private var sentRequestMillis = 0L
    
        /**
         * Extension header set by OkHttp specifying the timestamp when the cached HTTP response was
         * first received.
         */
        private var receivedResponseMillis = 0L
    
        /** Etag of the cached response. */
        private var etag: String? = null
    
        /** Age of the cached response. */
    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)
  3. okhttp/src/test/java/okhttp3/CacheTest.kt

        assertThat(response.code).isEqualTo(expectedResponseCode)
    
        // Exhaust the content stream.
        response.body.string()
        val cached = cacheGet(cache, request)
        if (shouldWriteToCache) {
          assertThat(cached).isNotNull()
          cached!!.body.close()
        } else {
          assertThat(cached).isNull()
        }
        server.shutdown() // tearDown() isn't sufficient; this test starts multiple servers
      }
    
    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)
  4. okhttp/src/test/java/okhttp3/CacheControlTest.kt

            .onlyIfCached()
            .noTransform()
            .immutable()
            .build()
        assertThat(cacheControl.toString()).isEqualTo(
          "no-cache, no-store, max-age=1, max-stale=2, min-fresh=3, only-if-cached, no-transform, immutable",
        )
        assertThat(cacheControl.noCache).isTrue()
        assertThat(cacheControl.noStore).isTrue()
        assertThat(cacheControl.maxAgeSeconds).isEqualTo(1)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

          listOf(
            Header(Header.TARGET_METHOD, "GET"),
            Header(Header.TARGET_SCHEME, "https"),
            Header(Header.TARGET_AUTHORITY, "squareup.com"),
            Header(Header.TARGET_PATH, "/cached"),
          )
        peer.sendFrame().pushPromise(3, 2, expectedRequestHeaders)
        val expectedResponseHeaders =
          listOf(
            Header(Header.RESPONSE_STATUS, "200"),
          )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 75.4K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/Cache.kt

     * if (forceCacheResponse.code() != 504) {
     *   // The resource was cached! Show it.
     * } else {
     *   // The resource was not cached.
     * }
     * ```
     *
     * This technique works even better in situations where a stale response is better than no response.
     * To permit stale cached responses, use the `max-stale` directive with the maximum staleness in
     * seconds:
     *
     * ```java
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  7. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

        }
      }
    
      // TODO GET preferred order - with tests to confirm this
      // 1. successful fresh cached GET response
      // 2. unsuccessful (404, 500) fresh cached GET response
      // 3. successful network response
      // 4. successful stale cached GET response
      // 5. unsuccessful response
      @Test
      fun usesCache() {
        val cache = Cache(cacheFs, "cache".toPath(), (100 * 1024).toLong())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 11K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/-CacheControlCommon.kt

            if (maxStaleSeconds != -1) append("max-stale=").append(maxStaleSeconds).append(", ")
            if (minFreshSeconds != -1) append("min-fresh=").append(minFreshSeconds).append(", ")
            if (onlyIfCached) append("only-if-cached, ")
            if (noTransform) append("no-transform, ")
            if (immutable) append("immutable, ")
            if (isEmpty()) return ""
            deleteRange(length - 2, length)
          }
        headerValue = result
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CallTest.kt

          .assertRequestHeader("Accept-Charset", "UTF-8")
          .assertSentRequestAtMillis(request1SentAt, request1ReceivedAt)
          .assertReceivedResponseAtMillis(request1SentAt, request1ReceivedAt)
    
        // Check the cached response. Its request contains only the saved Vary headers.
        cacheHit.cacheResponse()
          .assertCode(200)
          .assertHeaders(
            Headers.Builder()
              .add("ETag", "v1")
    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)
  10. okhttp/src/main/kotlin/okhttp3/CacheControl.kt

      @get:JvmName("minFreshSeconds") val minFreshSeconds: Int,
      /**
       * This field's name "only-if-cached" is misleading. It actually means "do not use the network".
       * It is set by a client who only wants to make a request if it can be fully satisfied by the
       * cache. Cached responses that would require validation (ie. conditional gets) are not permitted
       * if this header is set.
       */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 10K bytes
    - Viewed (0)
Back to top