mirror of https://github.com/apache/activemq.git
[AMQ-6951] Hide embedded jetty version
- WS transport - HTTP transport
This commit is contained in:
parent
2f40261362
commit
79f1c2feb7
|
@ -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 =
|
||||
|
|
|
@ -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 =
|
||||
|
|
Loading…
Reference in New Issue