-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Open
Labels
status: waiting-for-triageAn issue we've not yet triaged or decided onAn issue we've not yet triaged or decided on
Description
Issue is reproducible when you create new RestClient by adding Accept-Encoding: gzip as default header and try to read response body.
RestClient.builder().baseUrl("https://example.com")
.defaultHeader("Accept-Encoding", "gzip")
.requestFactory(new JdkClientHttpRequestFactory())
.build();
Have you considered asking for help on stackoverflow.com?
Yes. All documentation say that JDK Http Client only handles HTTP2 compressed headers automatically but cannot handle response body compressed using gzip / br / deflate, etc
** Enhancements requests **
We need to enhance JdkClientHttpRequestFactory to add new method similar to read-timeout workaround and create a custom jdk BodyHandler that wraps the decompression logic by using JDK inbuilt GZIPInputStream when response contains Content-Encoding header, etc.
Changes would be needed in JdkClientHttpRequestFactory, JdkHttpClientRequest
Metadata
Metadata
Assignees
Labels
status: waiting-for-triageAn issue we've not yet triaged or decided onAn issue we've not yet triaged or decided on