aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit.http/src/org/eclipse
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2015-05-10 09:48:38 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2015-05-10 23:36:49 +0200
commita24b7c3cc7053aaf9ac3621120b4fa42badcd4fe (patch)
tree7fa11e7bebcb195feb3868f220b2025b0e4a5287 /org.eclipse.jgit.junit.http/src/org/eclipse
parent3bc44010108a34e5fee3473412a0a28d2b19258d (diff)
downloadjgit-a24b7c3cc7053aaf9ac3621120b4fa42badcd4fe.tar.gz
jgit-a24b7c3cc7053aaf9ac3621120b4fa42badcd4fe.zip
Update to Jetty 9.2.10
Change-Id: Iace29e6e99836019bb603ce06a08b91bada7c627 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.junit.http/src/org/eclipse')
-rw-r--r--org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java20
-rw-r--r--org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java5
-rw-r--r--org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java2
3 files changed, 20 insertions, 7 deletions
diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java
index 6b0e0603e9..ce04bdf2c6 100644
--- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java
+++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java
@@ -60,10 +60,12 @@ import org.eclipse.jetty.security.ConstraintSecurityHandler;
import org.eclipse.jetty.security.MappedLoginService;
import org.eclipse.jetty.security.authentication.BasicAuthenticator;
import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.HttpConfiguration;
+import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.UserIdentity;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.util.security.Constraint;
import org.eclipse.jetty.util.security.Password;
@@ -95,14 +97,22 @@ public class AppServer {
private final Server server;
- private final Connector connector;
+ private final ServerConnector connector;
private final ContextHandlerCollection contexts;
private final TestRequestLog log;
public AppServer() {
- connector = new SelectChannelConnector();
+ server = new Server();
+
+ HttpConfiguration http_config = new HttpConfiguration();
+ http_config.setSecureScheme("https");
+ http_config.setSecurePort(8443);
+ http_config.setOutputBufferSize(32768);
+
+ connector = new ServerConnector(server,
+ new HttpConnectionFactory(http_config));
connector.setPort(0);
try {
final InetAddress me = InetAddress.getByName("localhost");
@@ -116,7 +126,6 @@ public class AppServer {
log = new TestRequestLog();
log.setHandler(contexts);
- server = new Server();
server.setConnectors(new Connector[] { connector });
server.setHandler(log);
}
@@ -173,7 +182,6 @@ public class AppServer {
cm.setPathSpec("/*");
ConstraintSecurityHandler sec = new ConstraintSecurityHandler();
- sec.setStrict(false);
sec.setRealmName(realm);
sec.setAuthenticator(authType);
sec.setLoginService(users);
@@ -232,7 +240,7 @@ public class AppServer {
/** @return the local port number the server is listening on. */
public int getPort() {
assertAlreadySetUp();
- return ((SelectChannelConnector) connector).getLocalPort();
+ return connector.getLocalPort();
}
/** @return all requests since the server was started. */
diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java
index 0accfc8b65..7600843d23 100644
--- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java
+++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java
@@ -187,4 +187,9 @@ public class RecordingLogger implements Logger {
public void ignore(Throwable arg0) {
// Ignore (not relevant to test failures)
}
+
+ @Override
+ public void debug(String msg, long value) {
+ // Ignore (not relevant to test failures)
+ }
}
diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java
index f71bc9350f..14ea03a921 100644
--- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java
+++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java
@@ -48,11 +48,11 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Semaphore;
+import javax.servlet.DispatcherType;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.eclipse.jetty.server.DispatcherType;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Response;
import org.eclipse.jetty.server.handler.HandlerWrapper;