Skip to content

HttpComponentsMessageSender does not set correctly the maximum connections per host for https connection [SWS-888] #965

@gregturn

Description

@gregturn

Amine Halawani opened SWS-888 and commented

The following piece of code is used to set the maximum number of connection by route in the method "setMaxConnectionsPerHost":

HttpHost host = new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme());
HttpRoute route = new HttpRoute(host);

This works well for http host but it does not work for https because the route will not be set as "secure". The following patch seems to work to correct this issue:

if (uri.getScheme().equals("https")) {
httpRoute = new HttpRoute(httpHost, null, true);
} else {
httpRoute = new HttpRoute(httpHost);
}


Affects: 2.1.2, 2.2.0.RELEASE

Referenced from: commits 8f559cf

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions