[SWS-888] HttpComponentsMessageSender does not set correctly the maximum connections per host for https connection Created: 22/Jan/15  Updated: 25/Mar/15  Resolved: 18/Mar/15

Status: Closed
Project: Spring Web Services
Component/s: Core
Affects Version/s: 2.1.2, 2.2.0.RELEASE
Fix Version/s: 2.2.1

Type: Bug Priority: Minor
Reporter: Amine Halawani Assignee: Greg Turnquist
Resolution: Complete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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);
}



 Comments   
Comment by Greg Turnquist [ 18/Mar/15 ]

Fixed by https://github.com/spring-projects/spring-ws/commit/8f559cfb99e64859ecbc42ba0171de503d992f40

Added extra test assertions to confirm expected behavior.

Generated at Thu Dec 14 06:21:20 UTC 2017 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.