You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2012/09/12 10:18:43 UTC

svn commit: r1383839 - in /camel/branches/camel-2.9.x: ./ components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java

Author: ningjiang
Date: Wed Sep 12 08:18:42 2012
New Revision: 1383839

URL: http://svn.apache.org/viewvc?rev=1383839&view=rev
Log:
Merged revisions 1383835 via svnmerge from 
https://svn.apache.org/repos/asf/camel/branches/camel-2.10.x

................
  r1383835 | ningjiang | 2012-09-12 16:11:30 +0800 (Wed, 12 Sep 2012) | 9 lines
  
  Merged revisions 1383824 via svnmerge from 
  https://svn.apache.org/repos/asf/camel/trunk
  
  ........
    r1383824 | ningjiang | 2012-09-12 15:58:47 +0800 (Wed, 12 Sep 2012) | 1 line
    
    CAMEL-5595 Fixed the camel-http4 default proxy scheme issue
  ........
................

Modified:
    camel/branches/camel-2.9.x/   (props changed)
    camel/branches/camel-2.9.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1383824
  Merged /camel/branches/camel-2.10.x:r1383835

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.9.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java?rev=1383839&r1=1383838&r2=1383839&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java (original)
+++ camel/branches/camel-2.9.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java Wed Sep 12 08:18:42 2012
@@ -21,6 +21,7 @@ import java.net.URISyntaxException;
 
 import org.apache.camel.PollingConsumer;
 import org.apache.camel.Producer;
+import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.component.http4.helper.HttpHelper;
 import org.apache.camel.impl.DefaultPollingEndpoint;
 import org.apache.camel.spi.HeaderFilterStrategy;
@@ -130,8 +131,12 @@ public class HttpEndpoint extends Defaul
             if (scheme == null) {
                 scheme = HttpHelper.isSecureConnection(getEndpointUri()) ? "https4" : "http4";
             }
-
             LOG.debug("CamelContext properties http.proxyHost, http.proxyPort, and http.proxyScheme detected. Using http proxy host: {} port: {} scheme: {}", new Object[]{host, port, scheme});
+            try {
+                component.registerPort(HttpHelper.isSecureConnection(scheme), component.getX509HostnameVerifier(), port, component.getSslContextParameters());
+            } catch (Exception ex) {
+                throw new RuntimeCamelException(ex);
+            }
             HttpHost proxy = new HttpHost(host, port, scheme);
             answer.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
         }