diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2015-05-10 09:48:38 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2015-05-10 23:36:49 +0200 |
commit | a24b7c3cc7053aaf9ac3621120b4fa42badcd4fe (patch) | |
tree | 7fa11e7bebcb195feb3868f220b2025b0e4a5287 /org.eclipse.jgit.junit.http | |
parent | 3bc44010108a34e5fee3473412a0a28d2b19258d (diff) | |
download | jgit-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')
4 files changed, 30 insertions, 17 deletions
diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF index 4e421ebcd5..6ebb18aa7c 100644 --- a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF @@ -10,16 +10,16 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Import-Package: javax.servlet;version="[2.5.0,3.2.0)", javax.servlet.http;version="[2.5.0,3.2.0)", org.apache.commons.logging;version="[1.1.1,2.0.0)", - org.eclipse.jetty.http;version="[7.6.0,8.0.0)", - org.eclipse.jetty.security;version="[7.6.0,8.0.0)", - org.eclipse.jetty.security.authentication;version="[7.6.0,8.0.0)", - org.eclipse.jetty.server;version="[7.6.0,8.0.0)", - org.eclipse.jetty.server.handler;version="[7.6.0,8.0.0)", - org.eclipse.jetty.server.nio;version="[7.6.0,8.0.0)", - org.eclipse.jetty.servlet;version="[7.6.0,8.0.0)", - org.eclipse.jetty.util.component;version="[7.6.0,8.0.0)", - org.eclipse.jetty.util.log;version="[7.6.0,8.0.0)", - org.eclipse.jetty.util.security;version="[7.6.0,8.0.0)", + org.eclipse.jetty.http;version="[9.0.0,10.0.0)", + org.eclipse.jetty.security;version="[9.0.0,10.0.0)", + org.eclipse.jetty.security.authentication;version="[9.0.0,10.0.0)", + org.eclipse.jetty.server;version="[9.0.0,10.0.0)", + org.eclipse.jetty.server.handler;version="[9.0.0,10.0.0)", + org.eclipse.jetty.server.nio;version="[9.0.0,10.0.0)", + org.eclipse.jetty.servlet;version="[9.0.0,10.0.0)", + org.eclipse.jetty.util.component;version="[9.0.0,10.0.0)", + org.eclipse.jetty.util.log;version="[9.0.0,10.0.0)", + org.eclipse.jetty.util.security;version="[9.0.0,10.0.0)", org.eclipse.jgit.errors;version="[4.0.0,4.1.0)", org.eclipse.jgit.http.server;version="[4.0.0,4.1.0)", org.eclipse.jgit.internal.storage.file;version="[4.0.0,4.1.0)", 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; |