Skip to content

Commit f7a3828

Browse files
Update trino-lb/src/http_server/mod.rs
Co-authored-by: Nick <[email protected]>
1 parent 918b334 commit f7a3828

File tree

1 file changed

+9
-2
lines changed
  • trino-lb/src/http_server

1 file changed

+9
-2
lines changed

trino-lb/src/http_server/mod.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,16 @@ pub async fn start_http_server(
130130
.route("/ui/index.html", get(ui::index::get_ui_index))
131131
.route("/ui/query.html", get(ui::query::get_ui_query))
132132
.layer(TraceLayer::new_for_http())
133-
// The Trino HTTP events (received at `/v1/trino-event-listener`) are compressed by default, so we need to need
134-
// to be able to accept compressed content
133+
// Transparently decompress request bodies based on the
134+
// Content-Encoding header.
135+
//
136+
// The Trino HTTP events (received at `/v1/trino-event-listener`) are
137+
// compressed by default, so we need to be able to accept compressed
138+
// content.
135139
.layer(RequestDecompressionLayer::new())
140+
// Compress response bodies if the associated request had an
141+
// Accept-Encoding header.
142+
//
136143
// Trino clients can ask for compressed data, so we should support compressing the response
137144
.layer(CompressionLayer::new())
138145
.with_state(app_state);

0 commit comments

Comments
 (0)