Uploaded image for project: 'Mule'
  1. Mule
  2. MULE-9563

Support nonProxyHosts in http:proxy

    Details

    • Type: Enhancement Request
    • Status: Closed
    • Priority: To be reviewed
    • Resolution: Completed
    • Affects Version/s: None
    • Fix Version/s: 3.9.0, 4.0.0
    • Component/s: None
    • Labels:

      Description

      The http:proxy definition

      http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
      

      does not contain the property nonProxyHosts.

      We have

      <http:request-config name="PLM_Vendor_HTTPS_Request_Configuration" host="${plm.vendor.http.host}" port="${plm.vendor.http.port}" basePath="${plm.vendor.http.path}" doc:name="HTTP Request Configuration" protocol="HTTP" responseTimeout="600000" proxy-ref="squid">
              <http:basic-authentication username="${plm.rest.username}" password="${plm.rest.password}" preemptive="true"/>
          </http:request-config>
      

      and in case of local running we would like to configure
      plm.vendor.http.host
      to "localhost" (with mock implementation).

      But this is not possible due to all requests are forwarded to our proxy server which cannot route back to localhost (Error 503):

      DEBUG 2016-04-11 08:27:14,446 [[plm-system-api].http.requester.PLM_Vendor_HTTPS_Request_Configuration(1) SelectorRunner] org.mule.module.http.internal.HttpMessageLogger: REQUESTER
      POST http://localhost:80/api/plm/masterdata/vendor/ HTTP/1.1
      MULE_ENCODING: UTF-8
      Host: localhost:80
      ===>
      DEBUG 2016-04-11 08:27:14,446 [[plm-system-api].http.requester.PLM_Vendor_HTTPS_Request_Configuration.worker(1)] org.mule.module.http.internal.HttpMessageLogger: REQUESTER
      HTTP/1.0 503 Service Unavailable
      Server: squid/3.1.10
      Mime-Version: 1.0
      Date: Mon, 11 Apr 2016 06:27:14 GMT
      Content-Type: text/html
      Content-Length: 2803
      X-Squid-Error: ERR_CONNECT_FAIL 111
      
      

      The

      com.ning.http.client.ProxyServer
      

      used by mule has a property "nonProxyHosts" which nobody fills.

      If it would be filled the

      	ProxyServer.getNonProxyHosts() line: 136	
      	ProxyUtils.avoidProxy(ProxyServer, String) line: 129	
      	ProxyUtils.avoidProxy(ProxyServer, Request) line: 98	
      	ProxyUtils.getProxyServer(AsyncHttpClientConfig, Request) line: 91	
      	ConnectionManager.openAsync(Request, CompletionHandler<Connection>) line: 115	
      	GrizzlyAsyncHttpProvider.execute(Request, AsyncHandler<T>) line: 174	
      	AsyncHttpClient.executeRequest(Request, AsyncHandler<T>) line: 506	
      	AsyncHttpClient.executeRequest(Request) line: 528	
      	GrizzlyHttpClient.send(HttpRequest, int, boolean, HttpRequestAuthentication) line: 215	
      

      would send the request without a proxy.

      Please add a property "nonProxyHosts" to "http:proxy".

      (There is a blog about automatic proxy config from 2010 but that is for http:connector which is deprecated: https://blog.codecentric.de/2010/03/automatische-proxywahl-fur-mule-esb-webservices/ )

        Attachments

          Activity

            People

            • Assignee:
              alejandro.iannucci Alejandro Iannucci
              Reporter:
              C-A-StefanCordes Stefan Cordes
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support

                  Backbone Issue Sync

                  • It looks like Backbone Issue Sync is not enabled for your project.