Skip to content

Remove support for Netty4ClientHttpRequestFactory in RestTemplateBuilder #9150

@bclozel

Description

@bclozel

I'm in favor of removing the automatic configuration of that request factory in RestTemplateBuilder for the following reasons:

  • as of Spring 5, Netty4ClientHttpRequestFactory is now deprecated
  • there are quite a few issues logged in Spring Framework (duplicate headers, such as SPR-15446 and SPR-15476)
  • by default, the Netty4ClientHttpRequestFactory is adding a "Connection: close" request header to all outgoing requests, which means that the underlying HTTP connection won't be reused between requests (which is a performance problem)

In that case, using any other request factory is a better choice for Spring Boot 2.0+.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions