Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 88 for uncompress (0.22 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. operator/cmd/mesh/manifest-generate_test.go

    		if cpErr != nil {
    			return cpErr
    		}
    
    		return nil
    	})
    }
    
    func TestMain(m *testing.M) {
    	code := m.Run()
    	// Cleanup uncompress snapshot charts
    	os.RemoveAll(string(snapshotCharts))
    	os.Exit(code)
    }
    
    func TestManifestGenerateComponentHubTag(t *testing.T) {
    	g := NewWithT(t)
    
    Go
    - Registered: Wed Mar 20 22:53:08 GMT 2024
    - Last Modified: Thu Feb 22 08:32:23 GMT 2024
    - 42K bytes
    - Viewed (0)
  6. internal/config/compress/compress.go

    	cfg := Config{}
    	if err = config.CheckValidKeys(config.CompressionSubSys, kvs, DefaultKVS); err != nil {
    		return cfg, err
    	}
    
    	compress := env.Get(EnvCompressState, kvs.Get(config.Enable))
    	if compress == "" {
    		compress = env.Get(EnvCompress, "")
    	}
    	cfg.Enabled, err = config.ParseBool(compress)
    	if err != nil {
    		// Parsing failures happen due to empty KVS, ignore it.
    		if kvs.Empty() {
    			return cfg, nil
    		}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 5K bytes
    - Viewed (0)
  7. internal/config/compress/legacy.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package compress
    
    import (
    	"strings"
    
    	"github.com/minio/minio/internal/config"
    )
    
    // Legacy envs.
    const (
    	EnvCompress                 = "MINIO_COMPRESS"
    	EnvCompressMimeTypesLegacy1 = "MINIO_COMPRESS_MIMETYPES"
    
    	// These envs were wrong but we supported them for a long time
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Jul 17 15:43:14 GMT 2022
    - 1.8K bytes
    - Viewed (0)
  8. docs/en/docs/how-to/custom-request-and-route.md

    First, we create a `GzipRequest` class, which will overwrite the `Request.body()` method to decompress the body in the presence of an appropriate header.
    
    If there's no `gzip` in the header, it will not try to decompress the body.
    
    That way, the same route class can handle gzip compressed or uncompressed requests.
    
    ```Python hl_lines="8-15"
    {!../../../docs_src/custom_request_and_route/tutorial001.py!}
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  9. cmd/object-api-utils.go

    					skipEnc *= sseDAREEncPackageBlockSize
    					compressedOffset += skipEnc
    					// Skip this number of uncompressed bytes.
    					partSkip -= uCompOff
    				}
    			}
    		} else {
    			// Not encrypted
    			var idx s2.Index
    			_, err := idx.Load(s2.RestoreIndexHeaders(oi.Parts[firstPartIdx].Index))
    
    			// Find compressed/uncompressed offsets of our partskip
    			compOff, uCompOff, err2 := idx.Find(partSkip)
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
  10. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketExtensions.kt

     * `server_max_window_bits`. This harms our ability to support these parameters:
     *
     *  * If `client_max_window_bits` is less than 15, OkHttp must close the web socket with code 1010.
     *    Otherwise it would compress values in a way that servers could not decompress.
     *  * If `server_max_window_bits` is less than 15, OkHttp will waste memory on an oversized buffer.
     *
     * See [RFC 7692, 7.1][rfc_7692] for details on negotiation process.
     *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.1K bytes
    - Viewed (0)
Back to top