Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-888

HttpComponentsMessageSender does not set correctly the maximum connections per host for https connection

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 2.1.2, 2.2.0.RELEASE
    • Fix Version/s: 2.2.1
    • Component/s: Core
    • Labels:
      None

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

        Activity

        Hide
        gregturn Greg Turnquist added a comment -

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

        Added extra test assertions to confirm expected behavior.

        Show
        gregturn Greg Turnquist added a comment - Fixed by https://github.com/spring-projects/spring-ws/commit/8f559cfb99e64859ecbc42ba0171de503d992f40 Added extra test assertions to confirm expected behavior.

          People

          • Assignee:
            gregturn Greg Turnquist
            Reporter:
            amh19 Amine Halawani
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: