Skip to content

Conversation

@oneonestar
Copy link

Add option to preserve content decoder.

Airlift Http Client by default disable compression by removing content decoder factories.
In Trino Gateway, we are forwarding request from client to Trino using Airlift Http Client.
We would like to preserve the encoding and allow the communication between Client, Gateway and Trino to use compression.

Relates to: trinodb/trino-gateway#765

Airlift contribution check list

  • Git commit messages follow https://cbea.ms/git-commit/.
  • All automated tests are passing.
  • Pull request was categorized using one of the existing labels.

@wendigo
Copy link
Contributor

wendigo commented Oct 2, 2025

I've filled jetty/jetty.project#13650 so we can make it a proper implementation

@oneonestar oneonestar force-pushed the star/preserve_decoder branch from 262e902 to 50eb8a3 Compare December 10, 2025 14:41
@oneonestar oneonestar force-pushed the star/preserve_decoder branch from 50eb8a3 to 12cba14 Compare December 10, 2025 14:42
@oneonestar
Copy link
Author

https://jetty.org/docs/jetty/12.1/programming-guide/client/http.html#content-response

HttpClient httpClient = new HttpClient();
httpClient.start();
// Remove all the default response content decoders.
httpClient.getContentDecoderFactories().clear();

Looks like the .clear() is the official way to do it. I rebased the PR, PTAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants