[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


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

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 Wed Dec 12 12:35:35 UTC 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.