Skip to content

Resttemplate with HttpComponentsClientHttpRequestFactory will make HttpMessageConverterExtractor.extractData return null if the header contains content-encoding gzip, the connection is closed and the response isn't chunked [SPR-12968] #17560

@spring-projects-issues

Description

@spring-projects-issues

Fredrik Albihn opened SPR-12968 and commented

Resttemplate with HttpComponentsClientHttpRequestFactory will make HttpMessageConverterExtractor.extractData return null if the header contains content-encoding gzip, the connection is closed and the response isn't chunked

When using Resttemplate with HttpComponentsClientHttpRequestFactory and the response includes content-encoding gzip
The HttpResponseInterceptor org.apache.http.client.protocol.ResponseContentEncoding will replace the entity with a org.apache.http.client.entity.GzipDecompressingEntity which always returns -1 as content length.

This will have the affect that
HttpMessageConverterExtractor.hasMessageBody will return false if the connection is closed and the response isn't chunked


Affects: 4.1.4

Issue Links:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions