- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for truncate (0.18 sec)
-
okhttp/src/test/java/okhttp3/CacheCorruptionTest.kt
} @Test fun truncatedMetadataEntry() { val response = testCorruptingCache { corruptMetadata { // truncate metadata to 1/4 of length it.substring(0, it.length / 4) } } assertThat(response.body.string()).isEqualTo("ABC.2") // not cached assertThat(cache.requestCount()).isEqualTo(2)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 6K bytes - Viewed (1) -
okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 8.7K bytes - Viewed (0) -
docs/changelogs/changelog_4x.md
and `www.squareup.com`. If a server refuses such sharing it will return HTTP 421 and OkHttp will automatically retry on an unshared connection. * Fix: Don't crash if a TLS tunnel's response body is truncated. * Fix: Don't track unusable routes beyond their usefulness. We had a bug where we could track certain bad routes indefinitely; now we only track the ones that could be necessary.
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) -
okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt
val fileBuilder = StringBuilder(key).append('.') val truncateTo = fileBuilder.length for (i in 0 until valueCount) { fileBuilder.append(i) cleanFiles += directory / fileBuilder.toString() fileBuilder.append(".tmp") dirtyFiles += directory / fileBuilder.toString() fileBuilder.setLength(truncateTo) } }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 34.7K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/RecordedRequest.kt
* was empty or unchunked. */ val chunkSizes: List<Int>, /** The total size of the body of this POST request (before truncation).*/ val bodySize: Long, /** The body of this POST request. This may be truncated. */ val body: Buffer, /** * The index of this request on its HTTP connection. Since a single HTTP connection may serve * multiple requests, each request is assigned its own sequence number. */
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 23 14:31:42 GMT 2024 - 3.8K bytes - Viewed (1) -
okhttp/src/test/java/okhttp3/MultipartReaderTest.kt
val part = parts.nextPart()!! assertThat(part.body.readUtf8()).isEqualTo("abcd") assertThat(parts.nextPart()).isNull() } @Test fun `truncated multipart`() { val multipart = """ |--simple boundary | |abcd |efgh | """.trimMargin() .replace("\n", "\r\n") val parts =
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 13.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Response.kt
* body. If fewer than [byteCount] bytes are in the response body, the full response body is * returned. If more than [byteCount] bytes are in the response body, the returned value * will be truncated to [byteCount] bytes. * * It is an error to call this method after the body has been consumed. * * **Warning:** this method loads the requested bytes into memory. Most applications should set
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 23 14:31:42 GMT 2024 - 15.5K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt
this.notAfter = notAfter } /** * Sets the certificate to be valid immediately and until the specified duration has elapsed. * The precision of this field is seconds; further precision will be truncated. */ fun duration( duration: Long, unit: TimeUnit, ) = apply { val now = System.currentTimeMillis() validityInterval(now, now + unit.toMillis(duration)) }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 21.6K bytes - Viewed (1) -
okhttp/src/test/java/okhttp3/CallTest.kt
assertThat(hostnameVerifier.calls).containsExactly("verify android.com") } /** * We had a bug where OkHttp would crash if HTTP proxies returned a truncated response. * https://github.com/square/okhttp/issues/5727 */ @Test fun proxyUpgradeFailsWithTruncatedResponse() { server.enqueue( MockResponse.Builder() .body("abc")
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) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt
object : Dispatcher() { override fun dispatch(request: RecordedRequest): MockResponse { return upgradeResponse(request) .body(Buffer().write("81".decodeHex())) // Truncated frame. .removeHeader("Content-Length") .socketPolicy(KeepOpen) .build() } } val webSocket: WebSocket = newWebSocket() clientListener.assertOpen()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 35.2K bytes - Viewed (1)