diff --git a/Cargo.lock b/Cargo.lock index 69f9623d..ff773042 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -60,21 +60,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - [[package]] name = "allocator-api2" version = "0.2.16" @@ -269,7 +254,6 @@ version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a" dependencies = [ - "brotli", "flate2", "futures-core", "memchr", @@ -707,27 +691,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "brotli" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - [[package]] name = "bstr" version = "1.6.0" @@ -7380,7 +7343,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d1d42a9b3f3ec46ba828e8d376aec14592ea199f70a06a548587ecd1c4ab658" dependencies = [ - "async-compression 0.3.15", "bitflags 1.3.2", "bytes", "futures-core", @@ -7389,8 +7351,6 @@ dependencies = [ "http-body", "http-range-header", "pin-project-lite", - "tokio", - "tokio-util", "tower-layer", "tower-service", "tracing", diff --git a/Cargo.toml b/Cargo.toml index 84e77bb1..13ecec69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -121,7 +121,7 @@ tonic-build = "0.10.0" tonic-health = "0.10.0" tower = { version = "0.4", features = [ "limit", "timeout" ] } tower-cookies = "0.9" -tower-http = { version = "0.4", features = [ "trace", "cors", "decompression-br", "compression-br" ] } +tower-http = { version = "0.4", features = [ "trace", "cors" ] } tracing = "0.1" tracing-appender = { version = "0.2" } tracing-subscriber = { version = "0.3.17", features = [ "env-filter", "json" ] } diff --git a/crates/local_backend/src/router.rs b/crates/local_backend/src/router.rs index 355f6ede..76b2dfd4 100644 --- a/crates/local_backend/src/router.rs +++ b/crates/local_backend/src/router.rs @@ -1,13 +1,11 @@ use std::time::Duration; use axum::{ - error_handling::HandleErrorLayer, extract::DefaultBodyLimit, routing::{ get, post, }, - BoxError, Router, }; use common::{ @@ -28,17 +26,12 @@ use http::{ request, HeaderValue, Method, - StatusCode, }; use isolate::HTTP_ACTION_BODY_LIMIT; use tower::ServiceBuilder; -use tower_http::{ - compression::CompressionLayer, - cors::{ - AllowOrigin, - CorsLayer, - }, - decompression::RequestDecompressionLayer, +use tower_http::cors::{ + AllowOrigin, + CorsLayer, }; use crate::{ @@ -132,17 +125,8 @@ pub async fn router(st: LocalAppState) -> Router { let cli_routes = Router::new() .route("/push_config", post(push_config)) .route("/prepare_schema", post(prepare_schema)) - .layer( - ServiceBuilder::new() - .layer(HandleErrorLayer::new(|_: BoxError| async { - StatusCode::INTERNAL_SERVER_ERROR - })) - .layer(RequestDecompressionLayer::new()) - .layer(CompressionLayer::new()) - .layer(DefaultBodyLimit::max(MAX_PUSH_BYTES)), - ) + .layer(DefaultBodyLimit::max(MAX_PUSH_BYTES)) .route("/get_config", post(get_config)) - .layer(CompressionLayer::new()) .route("/schema_state/:schema_id", get(schema_state)) .route("/stream_udf_execution", get(stream_udf_execution)) .merge(import_routes())