diff --git a/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpTransportServer.java b/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpTransportServer.java index 370742951a..f0ecefd00f 100644 --- a/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpTransportServer.java +++ b/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpTransportServer.java @@ -28,8 +28,9 @@ import org.apache.activemq.transport.util.TextWireFormat; import org.apache.activemq.transport.xstream.XStreamWireFormat; import org.apache.activemq.util.ServiceStopper; import org.eclipse.jetty.security.ConstraintSecurityHandler; +import org.eclipse.jetty.server.ConnectionFactory; import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.Handler; +import org.eclipse.jetty.server.HttpConnectionFactory; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.HandlerWrapper; import org.eclipse.jetty.servlet.ServletContextHandler; @@ -82,6 +83,12 @@ public class HttpTransportServer extends WebTransportServerSupport { connector = socketConnectorFactory.createConnector(server); } + for(ConnectionFactory cf : connector.getConnectionFactories()) { + if(HttpConnectionFactory.class.isAssignableFrom(cf.getClass())) { + HttpConnectionFactory.class.cast(cf).getHttpConfiguration().setSendServerVersion(false); + } + } + URI boundTo = bind(); ServletContextHandler contextHandler = diff --git a/activemq-http/src/main/java/org/apache/activemq/transport/ws/WSTransportServer.java b/activemq-http/src/main/java/org/apache/activemq/transport/ws/WSTransportServer.java index ea8867d76e..7aaaecc736 100644 --- a/activemq-http/src/main/java/org/apache/activemq/transport/ws/WSTransportServer.java +++ b/activemq-http/src/main/java/org/apache/activemq/transport/ws/WSTransportServer.java @@ -32,7 +32,9 @@ import org.apache.activemq.transport.ws.jetty9.WSServlet; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.ServiceStopper; import org.eclipse.jetty.security.ConstraintSecurityHandler; +import org.eclipse.jetty.server.ConnectionFactory; import org.eclipse.jetty.server.Connector; +import org.eclipse.jetty.server.HttpConnectionFactory; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; @@ -64,6 +66,12 @@ public class WSTransportServer extends WebTransportServerSupport implements Brok connector = socketConnectorFactory.createConnector(server); } + for(ConnectionFactory cf : connector.getConnectionFactories()) { + if(HttpConnectionFactory.class.isAssignableFrom(cf.getClass())) { + HttpConnectionFactory.class.cast(cf).getHttpConfiguration().setSendServerVersion(false); + } + } + URI boundTo = bind(); ServletContextHandler contextHandler =