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 09:58:48 UTC
svn commit: r1383824 -
/camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java
Author: ningjiang
Date: Wed Sep 12 07:58:47 2012
New Revision: 1383824
URL: http://svn.apache.org/viewvc?rev=1383824&view=rev
Log:
CAMEL-5595 Fixed the camel-http4 default proxy scheme issue
Modified:
camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java
Modified: camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java?rev=1383824&r1=1383823&r2=1383824&view=diff
==============================================================================
--- camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java (original)
+++ camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java Wed Sep 12 07:58:47 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;
@@ -132,8 +133,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);
}