Merge branch 'jetty-9.2.x' into jetty-9.3.x
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com> # Conflicts: # VERSION.txt # aggregates/jetty-all/pom.xml # apache-jsp/pom.xml # apache-jstl/pom.xml # examples/async-rest/async-rest-jar/pom.xml # examples/async-rest/async-rest-webapp/pom.xml # examples/async-rest/pom.xml # examples/embedded/pom.xml # examples/pom.xml # jetty-alpn/jetty-alpn-client/pom.xml # jetty-alpn/jetty-alpn-server/pom.xml # jetty-alpn/pom.xml # jetty-annotations/pom.xml # jetty-ant/pom.xml # jetty-cdi/pom.xml # jetty-client/pom.xml # jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTLSTest.java # jetty-continuation/pom.xml # jetty-deploy/pom.xml # jetty-distribution/pom.xml # jetty-fcgi/fcgi-client/pom.xml # jetty-fcgi/fcgi-server/pom.xml # jetty-fcgi/pom.xml # jetty-http-spi/pom.xml # jetty-http/pom.xml # jetty-http2/http2-alpn-tests/pom.xml # jetty-io/pom.xml # jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java # jetty-jaas/pom.xml # jetty-jaspi/pom.xml # jetty-jmx/pom.xml # jetty-jndi/pom.xml # jetty-jsp/pom.xml # jetty-jspc-maven-plugin/pom.xml # jetty-maven-plugin/pom.xml # jetty-monitor/pom.xml # jetty-nosql/pom.xml # jetty-osgi/jetty-osgi-alpn/pom.xml # jetty-osgi/jetty-osgi-boot-jsp/pom.xml # jetty-osgi/jetty-osgi-boot-warurl/pom.xml # jetty-osgi/jetty-osgi-boot/pom.xml # jetty-osgi/jetty-osgi-httpservice/pom.xml # jetty-osgi/pom.xml # jetty-osgi/test-jetty-osgi-context/pom.xml # jetty-osgi/test-jetty-osgi-webapp/pom.xml # jetty-osgi/test-jetty-osgi/pom.xml # jetty-plus/pom.xml # jetty-proxy/pom.xml # jetty-quickstart/pom.xml # jetty-rewrite/pom.xml # jetty-runner/pom.xml # jetty-security/pom.xml # jetty-server/pom.xml # jetty-servlet/pom.xml # jetty-servlets/pom.xml # jetty-spdy/pom.xml # jetty-spdy/spdy-client/pom.xml # jetty-spdy/spdy-core/pom.xml # jetty-spdy/spdy-example-webapp/pom.xml # jetty-spdy/spdy-http-client-transport/pom.xml # jetty-spdy/spdy-http-common/pom.xml # jetty-spdy/spdy-http-server/pom.xml # jetty-spdy/spdy-server/pom.xml # jetty-spring/pom.xml # jetty-start/pom.xml # jetty-util-ajax/pom.xml # jetty-util/pom.xml # jetty-webapp/pom.xml # jetty-websocket/javax-websocket-client-impl/pom.xml # jetty-websocket/javax-websocket-server-impl/pom.xml # jetty-websocket/pom.xml # jetty-websocket/websocket-api/pom.xml # jetty-websocket/websocket-client/pom.xml # jetty-websocket/websocket-common/pom.xml # jetty-websocket/websocket-server/pom.xml # jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/browser/BrowserDebugTool.java # jetty-websocket/websocket-servlet/pom.xml # jetty-xml/pom.xml # pom.xml # tests/pom.xml # tests/test-continuation/pom.xml # tests/test-integration/pom.xml # tests/test-jmx/jmx-webapp-it/pom.xml # tests/test-jmx/jmx-webapp/pom.xml # tests/test-jmx/pom.xml # tests/test-loginservice/pom.xml # tests/test-quickstart/pom.xml # tests/test-sessions/pom.xml # tests/test-sessions/test-hash-sessions/pom.xml # tests/test-sessions/test-jdbc-sessions/pom.xml # tests/test-sessions/test-mongodb-sessions/pom.xml # tests/test-sessions/test-sessions-common/pom.xml # tests/test-webapps/pom.xml # tests/test-webapps/test-jaas-webapp/pom.xml # tests/test-webapps/test-jetty-webapp/pom.xml # tests/test-webapps/test-jndi-webapp/pom.xml # tests/test-webapps/test-mock-resources/pom.xml # tests/test-webapps/test-proxy-webapp/pom.xml # tests/test-webapps/test-servlet-spec/pom.xml # tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml # tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml # tests/test-webapps/test-servlet-spec/test-web-fragment/pom.xml # tests/test-webapps/test-webapp-rfc2616/pom.xml
This commit is contained in:
commit
0df21b6e86
|
@ -12,6 +12,9 @@ jetty-9.3.26.v20190403 - 03 April 2019
|
|||
ForwardedRequestCustomizer
|
||||
+ 3319 Allow reverse sort for directory listed files
|
||||
|
||||
jetty-9.2.29.v20191105 - 05 November 2019
|
||||
+ 4217 SslConnection.DecryptedEnpoint.flush eternal busy loop
|
||||
|
||||
jetty-9.2.28.v20190418 - 18 April 2019
|
||||
+ 3549 Directory Listing on Windows reveals Resource Base path
|
||||
+ 3555 DefaultHandler Reveals Base Resource Path of each Context
|
||||
|
|
|
@ -40,7 +40,7 @@ public class WebSocketProtocolTest
|
|||
public void startServer() throws Exception
|
||||
{
|
||||
server = new BrowserDebugTool();
|
||||
server.prepare(0);
|
||||
server.prepare(0, 0);
|
||||
server.start();
|
||||
}
|
||||
|
||||
|
|
|
@ -21,11 +21,17 @@ package org.eclipse.jetty.websocket.server.browser;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jetty.server.HttpConfiguration;
|
||||
import org.eclipse.jetty.server.HttpConnectionFactory;
|
||||
import org.eclipse.jetty.server.SecureRequestCustomizer;
|
||||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.server.ServerConnector;
|
||||
import org.eclipse.jetty.server.SslConnectionFactory;
|
||||
import org.eclipse.jetty.server.handler.ResourceHandler;
|
||||
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
import org.eclipse.jetty.websocket.api.extensions.ExtensionConfig;
|
||||
import org.eclipse.jetty.websocket.common.extensions.FrameCaptureExtension;
|
||||
import org.eclipse.jetty.websocket.server.WebSocketHandler;
|
||||
|
@ -43,10 +49,12 @@ import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory;
|
|||
public class BrowserDebugTool implements WebSocketCreator
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(BrowserDebugTool.class);
|
||||
private ServerConnector secureConnector;
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
int port = 8080;
|
||||
int securePort = 8443;
|
||||
|
||||
for (int i = 0; i < args.length; i++)
|
||||
{
|
||||
|
@ -55,12 +63,17 @@ public class BrowserDebugTool implements WebSocketCreator
|
|||
{
|
||||
port = Integer.parseInt(args[++i]);
|
||||
}
|
||||
|
||||
if ("-sP".equals(a) || "--securePort".equals(a))
|
||||
{
|
||||
securePort = Integer.parseInt(args[++i]);
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
BrowserDebugTool tool = new BrowserDebugTool();
|
||||
tool.prepare(port);
|
||||
tool.prepare(port, securePort);
|
||||
tool.start();
|
||||
}
|
||||
catch (Throwable t)
|
||||
|
@ -118,13 +131,39 @@ public class BrowserDebugTool implements WebSocketCreator
|
|||
return connector.getLocalPort();
|
||||
}
|
||||
|
||||
public void prepare(int port)
|
||||
public int getSecurePort()
|
||||
{
|
||||
return secureConnector.getLocalPort();
|
||||
}
|
||||
|
||||
public void prepare(int port, int securePort)
|
||||
{
|
||||
server = new Server();
|
||||
connector = new ServerConnector(server);
|
||||
|
||||
HttpConfiguration httpConfiguration = new HttpConfiguration();
|
||||
httpConfiguration.setSecureScheme("https");
|
||||
httpConfiguration.setSecurePort(securePort);
|
||||
|
||||
connector = new ServerConnector(server, new HttpConnectionFactory(httpConfiguration));
|
||||
connector.setPort(port);
|
||||
server.addConnector(connector);
|
||||
|
||||
SslContextFactory sslContextFactory = new SslContextFactory();
|
||||
sslContextFactory.setKeyStorePath(MavenTestingUtils.getTestResourceFile("keystore").getAbsolutePath());
|
||||
sslContextFactory.setKeyStorePassword("storepwd");
|
||||
sslContextFactory.setKeyManagerPassword("keypwd");
|
||||
|
||||
// SSL HTTP Configuration
|
||||
HttpConfiguration httpsConfiguration = new HttpConfiguration(httpConfiguration);
|
||||
httpsConfiguration.addCustomizer(new SecureRequestCustomizer());
|
||||
|
||||
// SSL Connector
|
||||
secureConnector = new ServerConnector(server,
|
||||
new SslConnectionFactory(sslContextFactory,"http/1.1"),
|
||||
new HttpConnectionFactory(httpsConfiguration));
|
||||
secureConnector.setPort(securePort);
|
||||
server.addConnector(secureConnector);
|
||||
|
||||
WebSocketHandler wsHandler = new WebSocketHandler()
|
||||
{
|
||||
@Override
|
||||
|
@ -162,6 +201,7 @@ public class BrowserDebugTool implements WebSocketCreator
|
|||
{
|
||||
server.start();
|
||||
LOG.info("Server available on port {}", getPort());
|
||||
LOG.info("Server available on secure (TLS) port {}", getSecurePort());
|
||||
}
|
||||
|
||||
public void stop() throws Exception
|
||||
|
|
Loading…
Reference in New Issue