- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for uncompress (0.22 sec)
-
okhttp-brotli/src/main/kotlin/okhttp3/brotli/internal/Uncompress.kt
import okhttp3.ResponseBody.Companion.asResponseBody import okhttp3.internal.http.promisesBody import okio.GzipSource import okio.buffer import okio.source import org.brotli.dec.BrotliInputStream fun uncompress(response: Response): Response { if (!response.promisesBody()) { return response } val body = response.body val encoding = response.header("Content-Encoding") ?: return response
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Apr 01 13:19:01 GMT 2024 - 1.5K bytes - Viewed (0) -
okhttp-brotli/src/test/java/okhttp3/brotli/BrotliInterceptorTest.kt
val response = response("https://httpbin.org/brotli", s.decodeHex()) { header("Content-Encoding", "br") } val uncompressed = uncompress(response) val responseString = uncompressed.body.string() assertThat(responseString).contains("\"brotli\": true,") assertThat(responseString).contains("\"Accept-Encoding\": \"br\"") } @Test
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 4.2K bytes - Viewed (0) -
okhttp-brotli/src/test/java/okhttp3/brotli/BrotliBombTest.kt
.request(Request.Builder().url("https://example.com/").build()) .body(readBrotli10G().toResponseBody()) .protocol(Protocol.HTTP_2) .build() val uncompressed = uncompress(response) assertFailure { uncompressed.body.string() }.isInstanceOf<IOException>() .message() .isNotNull() .matches( Regex(
Plain Text - Registered: Fri Mar 29 11:42:11 GMT 2024 - Last Modified: Mon Jan 29 22:50:20 GMT 2024 - 2.9K bytes - Viewed (0) -
okhttp-brotli/src/main/kotlin/okhttp3/brotli/BrotliInterceptor.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3.brotli import okhttp3.Interceptor import okhttp3.Response import okhttp3.brotli.internal.uncompress /** * Transparent Brotli response support. * * Adds Accept-Encoding: br to request and checks (and strips) for Content-Encoding: br in
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt
// compress: 6 // b: 10 // after: { 11, 11, 22, 22, 33, 33, 00, 00, 00, 00, 00, 00, 77, 77, 88, 88 } // if (b != address.size) { if (compress == -1) return null // Address didn't have compression or enough groups. address.copyInto(address, address.size - (b - compress), compress, b) address.fill(0.toByte(), compress, compress + (address.size - b)) }
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11.2K bytes - Viewed (0) -
docs/changelogs/changelog_4x.md
* New: `OkHttpClient.Builder.minWebSocketMessageToCompress()` configures a threshold for compressing outbound web socket messages. Configure this with 0L to always compress outbound messages and `Long.MAX_VALUE` to never compress outbound messages. The default is 1024L which compresses messages of size 1 KiB and larger. (Inbound messages are compressed or not based on the web socket server's configuration.)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Wed Apr 17 13:25:31 GMT 2024 - 25.2K bytes - Viewed (0) -
CHANGELOG.md
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Thu Apr 18 01:31:39 GMT 2024 - 21.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketReaderTest.kt
assertFailsWith<EOFException> { clientReader.processNextFrame() } } @Test fun clientUncompressedMessageWithCompressedFlagThrows() { data.write("c10548656c6c6f".decodeHex()) // Uncompressed 'Hello', flag 1 set assertFailsWith<IOException> { clientReaderWithCompression.processNextFrame() } } @Test fun clientIncompleteControlFrameBodyThrows() {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 14.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Reader.kt
val inFinished = flags and FLAG_END_STREAM != 0 val gzipped = flags and FLAG_COMPRESSED != 0 if (gzipped) { throw IOException("PROTOCOL_ERROR: FLAG_COMPRESSED without SETTINGS_COMPRESS_DATA") } val padding = if (flags and FLAG_PADDED != 0) source.readByte() and 0xff else 0 val dataLength = lengthWithoutPadding(length, flags, padding)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 19.9K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
listener = webSocketResponse.webSocketListener!!, random = SecureRandom(), pingIntervalMillis = 0, extensions = WebSocketExtensions.parse(webSocketResponse.headers), // Compress all messages if compression is enabled. minimumDeflateSize = 0L, webSocketCloseTimeout = RealWebSocket.CANCEL_AFTER_CLOSE_MILLIS, ) val name = "MockWebServer WebSocket ${request.path!!}"
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 37.4K bytes - Viewed (0)