Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-16642

proxyHost / proxyPort parameters seem to be ignored by HTTP4 component (and HTTP component)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • fuse-7.9-GA
    • fuse-7.8-GA
    • Camel
    • None
    • False
    • False
    • % %
    • Undefined
    • Hide

      Verified via code inspection. This is documented and fixed upstream via:

      https://issues.apache.org/jira/browse/CAMEL-15012

      Show
      Verified via code inspection. This is documented and fixed upstream via: https://issues.apache.org/jira/browse/CAMEL-15012

    Description

      The configureHttpProxy method in the org.apache.camel.component.http4.HttpComponent class ignores the documented proxyHost and proxyPort parameters and instead only processes parameters for authenticating proxies:

          private HttpClientConfigurer configureHttpProxy(Map<String, Object> parameters, HttpClientConfigurer configurer, boolean secure) throws Exception {
              String proxyAuthScheme = getParameter(parameters, "proxyAuthScheme", String.class);
              if (proxyAuthScheme == null) {
                  // fallback and use either http or https depending on secure
                  proxyAuthScheme = secure ? "https" : "http";
              }
              String proxyAuthHost = getParameter(parameters, "proxyAuthHost", String.class);
              Integer proxyAuthPort = getParameter(parameters, "proxyAuthPort", Integer.class);
      
              if (proxyAuthHost != null && proxyAuthPort != null) {
                  String proxyAuthUsername = getParameter(parameters, "proxyAuthUsername", String.class);
                  String proxyAuthPassword = getParameter(parameters, "proxyAuthPassword", String.class);
                  String proxyAuthDomain = getParameter(parameters, "proxyAuthDomain", String.class);
                  String proxyAuthNtHost = getParameter(parameters, "proxyAuthNtHost", String.class);
      
                  if (proxyAuthUsername != null && proxyAuthPassword != null) {
                      return CompositeHttpConfigurer.combineConfigurers(
                          configurer, new ProxyHttpClientConfigurer(proxyAuthHost, proxyAuthPort, proxyAuthScheme, proxyAuthUsername, proxyAuthPassword, proxyAuthDomain, proxyAuthNtHost));
                  } else {
                      return CompositeHttpConfigurer.combineConfigurers(configurer, new ProxyHttpClientConfigurer(proxyAuthHost, proxyAuthPort, proxyAuthScheme));
                  }
              }
      
              return configurer;
          }
      

      Attachments

        Activity

          People

            ldemasi Luigi De Masi
            rhn-support-dhawkins Duane Hawkins
            Branislav Smolicek Branislav Smolicek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: