activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-5804
Date Fri, 19 Jun 2015 20:29:06 GMT
Repository: activemq
Updated Branches:
  refs/heads/master a35be76ff -> d919db5e3


https://issues.apache.org/jira/browse/AMQ-5804

Apply patch from Pavlo Vasylchenko

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/d919db5e
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/d919db5e
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/d919db5e

Branch: refs/heads/master
Commit: d919db5e3d8f453c173f6ed82b1e0bce3b3df5fb
Parents: a35be76
Author: Timothy Bish <tabish121@gmail.com>
Authored: Fri Jun 19 16:28:43 2015 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Fri Jun 19 16:28:59 2015 -0400

----------------------------------------------------------------------
 .../apache/activemq/transport/http/HttpClientTransport.java   | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/d919db5e/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
b/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
index 435fafe..4715d02 100755
--- a/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
+++ b/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
@@ -47,6 +47,8 @@ import org.apache.http.client.methods.HttpOptions;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.conn.ClientConnectionManager;
 import org.apache.http.conn.params.ConnRoutePNames;
+import org.apache.http.conn.scheme.PlainSocketFactory;
+import org.apache.http.conn.scheme.Scheme;
 import org.apache.http.entity.ByteArrayEntity;
 import org.apache.http.impl.client.BasicResponseHandler;
 import org.apache.http.impl.client.DefaultHttpClient;
@@ -325,6 +327,11 @@ public class HttpClientTransport extends HttpTransportSupport {
             HttpHost proxy = new HttpHost(getProxyHost(), getProxyPort());
             client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
 
+            if (client.getConnectionManager().getSchemeRegistry().get("http") == null) {
+                client.getConnectionManager().getSchemeRegistry().register(
+                    new Scheme("http", getProxyPort(), PlainSocketFactory.getSocketFactory()));
+            }
+
             if(getProxyUser() != null && getProxyPassword() != null) {
                 client.getCredentialsProvider().setCredentials(
                     new AuthScope(getProxyHost(), getProxyPort()),


Mime
View raw message