diff --git a/src/servers/src/http.rs b/src/servers/src/http.rs index 816bccc61e..eba588fdbd 100644 --- a/src/servers/src/http.rs +++ b/src/servers/src/http.rs @@ -747,7 +747,7 @@ impl HttpServer { .layer( ServiceBuilder::new() .layer(HandleErrorLayer::new(handle_error)) - .layer(RequestDecompressionLayer::new()), + .layer(RequestDecompressionLayer::new().pass_through_unaccepted(true)), ) .with_state(log_state) } @@ -767,7 +767,7 @@ impl HttpServer { .layer( ServiceBuilder::new() .layer(HandleErrorLayer::new(handle_error)) - .layer(RequestDecompressionLayer::new()), + .layer(RequestDecompressionLayer::new().pass_through_unaccepted(true)), ) .with_state(log_state) } @@ -860,7 +860,7 @@ impl HttpServer { .layer( ServiceBuilder::new() .layer(HandleErrorLayer::new(handle_error)) - .layer(RequestDecompressionLayer::new()), + .layer(RequestDecompressionLayer::new().pass_through_unaccepted(true)), ) .route("/ping", routing::get(influxdb_ping)) .route("/health", routing::get(influxdb_health)) @@ -881,7 +881,7 @@ impl HttpServer { .layer( ServiceBuilder::new() .layer(HandleErrorLayer::new(handle_error)) - .layer(RequestDecompressionLayer::new()), + .layer(RequestDecompressionLayer::new().pass_through_unaccepted(true)), ) .with_state(otlp_handler) } diff --git a/tests-integration/tests/http.rs b/tests-integration/tests/http.rs index 4245527cf7..0027700e80 100644 --- a/tests-integration/tests/http.rs +++ b/tests-integration/tests/http.rs @@ -1898,6 +1898,14 @@ pub async fn test_loki_pb_logs(store_type: StorageType) { HeaderName::from_static("content-type"), HeaderValue::from_static("application/x-protobuf"), ), + ( + HeaderName::from_static("content-encoding"), + HeaderValue::from_static("snappy"), + ), + ( + HeaderName::from_static("accept-encoding"), + HeaderValue::from_static("identity"), + ), ( HeaderName::from_static(GREPTIME_LOG_TABLE_NAME_HEADER_NAME), HeaderValue::from_static("loki_table_name"),