Krzysztof Daniel a75b68c
From eaca20d2a41ba2771bd379408d87673b12646390 Wed, 27 Feb 2013 09:33:50 +0100
Krzysztof Daniel a75b68c
From: Krzysztof Daniel <kdaniel@redhat.com>
Krzysztof Daniel a75b68c
Date: Tue, 26 Feb 2013 21:25:42 +0100
Krzysztof Daniel a75b68c
Subject: [PATCH] Adopt jetty 9
Krzysztof Daniel a75b68c
Krzysztof Daniel a75b68c
diff --git rt.equinox.bundles/bundles/org.eclipse.equinox.http.jetty8/META-INF/MANIFEST.MF rt.equinox.bundles/bundles/org.eclipse.equinox.http.jetty8/META-INF/MANIFEST.MF
Krzysztof Daniel a75b68c
index deb06c3..f993d0e 100755
Krzysztof Daniel a75b68c
--- rt.equinox.bundles/bundles/org.eclipse.equinox.http.jetty8/META-INF/MANIFEST.MF
Krzysztof Daniel a75b68c
+++ rt.equinox.bundles/bundles/org.eclipse.equinox.http.jetty8/META-INF/MANIFEST.MF
Krzysztof Daniel a75b68c
@@ -9,23 +9,20 @@
Krzysztof Daniel a75b68c
 Import-Package: javax.servlet;version="[2.6.0,4.0.0)",
Krzysztof Daniel a75b68c
  javax.servlet.http;version="[2.6.0,4.0.0)",
Krzysztof Daniel a75b68c
  org.eclipse.equinox.http.servlet;version="1.0.0",
Krzysztof Daniel a75b68c
- org.eclipse.jetty.http;version="[8.0.0,9.0.0)",
Krzysztof Daniel a75b68c
- org.eclipse.jetty.io.bio;version="[8.0.0,9.0.0)",
Krzysztof Daniel a75b68c
- org.eclipse.jetty.io.nio;version="[8.0.0,9.0.0)",
Krzysztof Daniel a75b68c
- org.eclipse.jetty.server;version="[8.0.0,9.0.0)",
Krzysztof Daniel a75b68c
- org.eclipse.jetty.server.bio;version="[8.0.0,9.0.0)",
Krzysztof Daniel a75b68c
- org.eclipse.jetty.server.handler;version="[8.0.0,9.0.0)",
Krzysztof Daniel a75b68c
- org.eclipse.jetty.server.nio;version="[8.0.0,9.0.0)",
Krzysztof Daniel a75b68c
- org.eclipse.jetty.server.session;version="[8.0.0,9.0.0)",
Krzysztof Daniel a75b68c
- org.eclipse.jetty.server.ssl;version="[8.0.0,9.0.0)",
Krzysztof Daniel a75b68c
- org.eclipse.jetty.servlet;version="[8.0.0,9.0.0)",
Krzysztof Daniel a75b68c
- org.eclipse.jetty.util;version="[8.0.0,9.0.0)",
Krzysztof Daniel a75b68c
- org.eclipse.jetty.util.component;version="[8.0.0,9.0.0)",
Krzysztof Daniel a75b68c
- org.eclipse.jetty.util.log;version="[8.0.0,9.0.0)",
Krzysztof Daniel a75b68c
+ org.eclipse.jetty.http;version="[9.0.0,10.0.0)",
Krzysztof Daniel a75b68c
+ org.eclipse.jetty.server;version="[9.0.0,10.0.0)",
Krzysztof Daniel a75b68c
+ org.eclipse.jetty.server.handler;version="[9.0.0,10.0.0)",
Krzysztof Daniel a75b68c
+ org.eclipse.jetty.server.nio;version="[9.0.0,10.0.0)",
Krzysztof Daniel a75b68c
+ org.eclipse.jetty.server.session;version="[9.0.0,10.0.0)",
Krzysztof Daniel a75b68c
+ org.eclipse.jetty.servlet;version="[9.0.0,10.0.0)",
Krzysztof Daniel a75b68c
+ org.eclipse.jetty.util;version="[9.0.0,10.0.0)",
Krzysztof Daniel a75b68c
+ org.eclipse.jetty.util.component;version="[9.0.0,10.0.0)",
Krzysztof Daniel a75b68c
+ org.eclipse.jetty.util.log;version="[9.0.0,10.0.0)",
Krzysztof Daniel a75b68c
+ org.eclipse.jetty.util.ssl;version="[9.0.0,10.0.0)",
Krzysztof Daniel a75b68c
  org.osgi.framework;version="1.3.0",
Mat Booth 39a3b2a
  org.osgi.service.cm;version="[1.4, 2.0)",
Krzysztof Daniel a75b68c
  org.osgi.service.startlevel;version="1.0"
Krzysztof Daniel a75b68c
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
Krzysztof Daniel a75b68c
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Krzysztof Daniel a75b68c
 Export-Package: org.eclipse.equinox.http.jetty;version="1.1.0"
Krzysztof Daniel a75b68c
 Comment-Header: Both Eclipse-LazyStart and Bundle-ActivationPolicy are specified for compatibility with 3.2
Krzysztof Daniel a75b68c
 Eclipse-LazyStart: true
Krzysztof Daniel a75b68c
diff --git rt.equinox.bundles/bundles/org.eclipse.equinox.http.jetty8/jetty6-to-jetty7.patch rt.equinox.bundles/bundles/org.eclipse.equinox.http.jetty8/jetty6-to-jetty7.patch
Krzysztof Daniel a75b68c
deleted file mode 100644
Krzysztof Daniel a75b68c
index d55a157..0000000
Krzysztof Daniel a75b68c
--- rt.equinox.bundles/bundles/org.eclipse.equinox.http.jetty8/jetty6-to-jetty7.patch
Krzysztof Daniel a75b68c
+++ /dev/null
Krzysztof Daniel a75b68c
@@ -1,204 +0,0 @@
Krzysztof Daniel a75b68c
-Index: .project
Krzysztof Daniel a75b68c
-===================================================================
Krzysztof Daniel a75b68c
-RCS file: /cvsroot/rt/org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty6/.project,v
Krzysztof Daniel a75b68c
-retrieving revision 1.3
Krzysztof Daniel a75b68c
-diff -u -r1.3 .project
Krzysztof Daniel a75b68c
---- .project	25 Apr 2008 14:38:54 -0000	1.3
Krzysztof Daniel a75b68c
-+++ .project	16 Apr 2010 21:35:58 -0000
Krzysztof Daniel a75b68c
-@@ -1,6 +1,6 @@
Krzysztof Daniel a75b68c
- 
Krzysztof Daniel a75b68c
- <projectDescription>
Krzysztof Daniel a75b68c
--	<name>org.eclipse.equinox.http.jetty6</name>
Krzysztof Daniel a75b68c
-+	<name>org.eclipse.equinox.http.jetty7</name>
Krzysztof Daniel a75b68c
- 	<comment></comment>
Krzysztof Daniel a75b68c
- 	<projects>
Krzysztof Daniel a75b68c
- 	</projects>
Krzysztof Daniel a75b68c
-Index: META-INF/MANIFEST.MF
Krzysztof Daniel a75b68c
-===================================================================
Krzysztof Daniel a75b68c
-RCS file: /cvsroot/rt/org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty6/META-INF/MANIFEST.MF,v
Krzysztof Daniel a75b68c
-retrieving revision 1.24
Krzysztof Daniel a75b68c
-diff -u -r1.24 MANIFEST.MF
Krzysztof Daniel a75b68c
---- META-INF/MANIFEST.MF	24 Apr 2009 20:54:41 -0000	1.24
Krzysztof Daniel a75b68c
-+++ META-INF/MANIFEST.MF	16 Apr 2010 21:35:58 -0000
Krzysztof Daniel a75b68c
-@@ -4,23 +4,28 @@
Krzysztof Daniel a75b68c
- Bundle-Vendor: %providerName
Krzysztof Daniel a75b68c
- Bundle-Localization: plugin
Krzysztof Daniel a75b68c
- Bundle-SymbolicName: org.eclipse.equinox.http.jetty
Krzysztof Daniel a75b68c
--Bundle-Version: 2.0.0.qualifier
Krzysztof Daniel a75b68c
-+Bundle-Version: 3.0.0.qualifier
Krzysztof Daniel a75b68c
- Bundle-Activator: org.eclipse.equinox.http.jetty.internal.Activator
Krzysztof Daniel a75b68c
- Import-Package: javax.servlet;version="[2.5.0,2.6.0)",
Krzysztof Daniel a75b68c
-  javax.servlet.http;version="[2.5.0,2.6.0)",
Krzysztof Daniel a75b68c
-  org.eclipse.equinox.http.servlet;version="1.0.0",
Krzysztof Daniel a75b68c
-- org.mortbay.component;version="[6.1.0,7.0.0)",
Krzysztof Daniel a75b68c
-- org.mortbay.jetty;version="[6.1.0,7.0.0)",
Krzysztof Daniel a75b68c
-- org.mortbay.jetty.bio;version="[6.1.0,7.0.0)",
Krzysztof Daniel a75b68c
-- org.mortbay.jetty.handler;version="[6.1.0,7.0.0)",
Krzysztof Daniel a75b68c
-- org.mortbay.jetty.nio;version="[6.1.0,7.0.0)",
Krzysztof Daniel a75b68c
-- org.mortbay.jetty.security;version="[6.1.0,7.0.0)",
Krzysztof Daniel a75b68c
-- org.mortbay.jetty.servlet;version="[6.1.0,7.0.0)",
Krzysztof Daniel a75b68c
-- org.mortbay.log;version="[6.1.0,7.0.0)",
Krzysztof Daniel a75b68c
-+ org.eclipse.jetty.http;version="[7.0.0,8.0.0)",
Krzysztof Daniel a75b68c
-+ org.eclipse.jetty.io.bio;version="[7.0.0,8.0.0)",
Krzysztof Daniel a75b68c
-+ org.eclipse.jetty.io.nio;version="[7.0.0,8.0.0)",
Krzysztof Daniel a75b68c
-+ org.eclipse.jetty.server;version="[7.0.0,8.0.0)",
Krzysztof Daniel a75b68c
-+ org.eclipse.jetty.server.bio;version="[7.0.0,8.0.0)",
Krzysztof Daniel a75b68c
-+ org.eclipse.jetty.server.handler;version="[7.0.0,8.0.0)",
Krzysztof Daniel a75b68c
-+ org.eclipse.jetty.server.nio;version="[7.0.0,8.0.0)",
Krzysztof Daniel a75b68c
-+ org.eclipse.jetty.server.session;version="[7.0.0,8.0.0)",
Krzysztof Daniel a75b68c
-+ org.eclipse.jetty.server.ssl;version="[7.0.0,8.0.0)",
Krzysztof Daniel a75b68c
-+ org.eclipse.jetty.servlet;version="[7.0.0,8.0.0)",
Krzysztof Daniel a75b68c
-+ org.eclipse.jetty.util;version="[7.0.0,8.0.0)",
Krzysztof Daniel a75b68c
-+ org.eclipse.jetty.util.component;version="[7.0.0,8.0.0)",
Krzysztof Daniel a75b68c
-+ org.eclipse.jetty.util.log;version="[7.0.0,8.0.0)",
Krzysztof Daniel a75b68c
-  org.osgi.framework;version="1.3.0",
Krzysztof Daniel a75b68c
-  org.osgi.service.cm;version="1.2.0",
Krzysztof Daniel a75b68c
-  org.osgi.service.startlevel;version="1.0"
Krzysztof Daniel a75b68c
--Bundle-RequiredExecutionEnvironment: J2SE-1.4
Krzysztof Daniel a75b68c
-+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Krzysztof Daniel a75b68c
- Export-Package: org.eclipse.equinox.http.jetty;version="1.1.0"
Krzysztof Daniel a75b68c
- Comment-Header: Both Eclipse-LazyStart and Bundle-ActivationPolicy are specified for compatibility with 3.2
Krzysztof Daniel a75b68c
- Eclipse-LazyStart: true
Krzysztof Daniel a75b68c
-Index: src/org/eclipse/equinox/http/jetty/JettyCustomizer.java
Krzysztof Daniel a75b68c
-===================================================================
Krzysztof Daniel a75b68c
-RCS file: /cvsroot/rt/org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty6/src/org/eclipse/equinox/http/jetty/JettyCustomizer.java,v
Krzysztof Daniel a75b68c
-retrieving revision 1.2
Krzysztof Daniel a75b68c
-diff -u -r1.2 JettyCustomizer.java
Krzysztof Daniel a75b68c
---- src/org/eclipse/equinox/http/jetty/JettyCustomizer.java	17 Apr 2009 21:58:58 -0000	1.2
Krzysztof Daniel a75b68c
-+++ src/org/eclipse/equinox/http/jetty/JettyCustomizer.java	16 Apr 2010 21:35:58 -0000
Krzysztof Daniel a75b68c
-@@ -33,13 +33,13 @@
Krzysztof Daniel a75b68c
- 	 * framework. Changing those may cause breakage and thus must be avoided.
Krzysztof Daniel a75b68c
- 	 * 

Krzysztof Daniel a75b68c
- 	 * @param context 
Krzysztof Daniel a75b68c
--	 *             	the Jetty context; in case of Jetty 6 the context is of 
Krzysztof Daniel a75b68c
--	 *             	type org.mortbay.jetty.servlet.Context
Krzysztof Daniel a75b68c
-+	 *             	the Jetty context; in case of Jetty 7 the context is of 
Krzysztof Daniel a75b68c
-+	 *             	type org.eclipse.jetty.servlet.ServletContextHandler
Krzysztof Daniel a75b68c
- 	 * @param settings
Krzysztof Daniel a75b68c
- 	 * 				the settings as passed to {@link JettyConfigurator#startServer(String, Dictionary)}
Krzysztof Daniel a75b68c
- 	 * @return context
Krzysztof Daniel a75b68c
--	 *             	the customized context; in case of Jetty 6 the context is of 
Krzysztof Daniel a75b68c
--	 *             	type org.mortbay.jetty.servlet.Context
Krzysztof Daniel a75b68c
-+	 *             	the customized context; in case of Jetty 7 the context is of 
Krzysztof Daniel a75b68c
-+	 *             	type org.eclipse.jetty.servlet.ServletContextHandler
Krzysztof Daniel a75b68c
- 	 */
Krzysztof Daniel a75b68c
- 	public Object customizeContext(Object context, Dictionary settings) {
Krzysztof Daniel a75b68c
- 		return context;
Krzysztof Daniel a75b68c
-@@ -52,13 +52,13 @@
Krzysztof Daniel a75b68c
- 	 * Implementors may perform additional configuration of the Jetty Connector.
Krzysztof Daniel a75b68c
- 	 * 

Krzysztof Daniel a75b68c
- 	 * @param connector 
Krzysztof Daniel a75b68c
--	 *             	the Jetty connector; in case of Jetty 6 the context is of 
Krzysztof Daniel a75b68c
--	 *             	type org.mortbay.jetty.Connector
Krzysztof Daniel a75b68c
-+	 *             	the Jetty connector; in case of Jetty 7 the context is of 
Krzysztof Daniel a75b68c
-+	 *             	type org.eclipse.jetty.server.Connector
Krzysztof Daniel a75b68c
- 	 * @param settings
Krzysztof Daniel a75b68c
- 	 * 				the settings as passed to {@link JettyConfigurator#startServer(String, Dictionary)}
Krzysztof Daniel a75b68c
- 	 * @return connector
Krzysztof Daniel a75b68c
- 	 *             	the customized connector; in case of Jetty 6 the connector is of 
Krzysztof Daniel a75b68c
--	 *             	type org.mortbay.jetty.Connector
Krzysztof Daniel a75b68c
-+	 *             	type org.eclipse.jetty.server.Connector
Krzysztof Daniel a75b68c
- 	 */
Krzysztof Daniel a75b68c
- 	public Object customizeHttpConnector(Object connector, Dictionary settings) {
Krzysztof Daniel a75b68c
- 		return connector;
Krzysztof Daniel a75b68c
-@@ -71,13 +71,13 @@
Krzysztof Daniel a75b68c
- 	 * Implementors may perform additional configuration of the Jetty Connector.
Krzysztof Daniel a75b68c
- 	 * 

Krzysztof Daniel a75b68c
- 	 * @param connector 
Krzysztof Daniel a75b68c
--	 *             	the Jetty connector; in case of Jetty 6 the connector is of 
Krzysztof Daniel a75b68c
--	 *             	type org.mortbay.jetty.Connector
Krzysztof Daniel a75b68c
-+	 *             	the Jetty connector; in case of Jetty 7 the connector is of 
Krzysztof Daniel a75b68c
-+	 *             	type oorg.eclipse.jetty.server.Connector
Krzysztof Daniel a75b68c
- 	 * @param settings
Krzysztof Daniel a75b68c
- 	 * 				the settings as passed to {@link JettyConfigurator#startServer(String, Dictionary)}
Krzysztof Daniel a75b68c
- 	 * @return connector
Krzysztof Daniel a75b68c
--	 *             	the customized connector; in case of Jetty 6 the connector is of 
Krzysztof Daniel a75b68c
--	 *             	type org.mortbay.jetty.Connector
Krzysztof Daniel a75b68c
-+	 *             	the customized connector; in case of Jetty 7 the connector is of 
Krzysztof Daniel a75b68c
-+	 *             	type org.eclipse.jetty.server.Connector
Krzysztof Daniel a75b68c
- 	 */
Krzysztof Daniel a75b68c
- 	public Object customizeHttpsConnector(Object connector, Dictionary settings) {
Krzysztof Daniel a75b68c
- 		return connector;
Krzysztof Daniel a75b68c
-Index: src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java
Krzysztof Daniel a75b68c
-===================================================================
Krzysztof Daniel a75b68c
-RCS file: /cvsroot/rt/org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty6/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java,v
Krzysztof Daniel a75b68c
-retrieving revision 1.20
Krzysztof Daniel a75b68c
-diff -u -r1.20 HttpServerManager.java
Krzysztof Daniel a75b68c
---- src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java	20 May 2009 21:12:37 -0000	1.20
Krzysztof Daniel a75b68c
-+++ src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java	16 Apr 2010 21:35:58 -0000
Krzysztof Daniel a75b68c
-@@ -18,12 +18,15 @@
Krzysztof Daniel a75b68c
- import org.eclipse.equinox.http.jetty.JettyConstants;
Krzysztof Daniel a75b68c
- import org.eclipse.equinox.http.jetty.JettyCustomizer;
Krzysztof Daniel a75b68c
- import org.eclipse.equinox.http.servlet.HttpServiceServlet;
Krzysztof Daniel a75b68c
--import org.mortbay.jetty.Connector;
Krzysztof Daniel a75b68c
--import org.mortbay.jetty.Server;
Krzysztof Daniel a75b68c
--import org.mortbay.jetty.bio.SocketConnector;
Krzysztof Daniel a75b68c
--import org.mortbay.jetty.nio.SelectChannelConnector;
Krzysztof Daniel a75b68c
--import org.mortbay.jetty.security.SslSocketConnector;
Krzysztof Daniel a75b68c
--import org.mortbay.jetty.servlet.*;
Krzysztof Daniel a75b68c
-+import org.eclipse.jetty.server.Connector;
Krzysztof Daniel a75b68c
-+import org.eclipse.jetty.server.Server;
Krzysztof Daniel a75b68c
-+import org.eclipse.jetty.server.bio.SocketConnector;
Krzysztof Daniel a75b68c
-+import org.eclipse.jetty.server.nio.SelectChannelConnector;
Krzysztof Daniel a75b68c
-+import org.eclipse.jetty.server.session.HashSessionManager;
Krzysztof Daniel a75b68c
-+import org.eclipse.jetty.server.session.SessionHandler;
Krzysztof Daniel a75b68c
-+import org.eclipse.jetty.server.ssl.SslSocketConnector;
Krzysztof Daniel a75b68c
-+import org.eclipse.jetty.servlet.ServletContextHandler;
Krzysztof Daniel a75b68c
-+import org.eclipse.jetty.servlet.ServletHolder;
Krzysztof Daniel a75b68c
- import org.osgi.framework.Constants;
Krzysztof Daniel a75b68c
- import org.osgi.service.cm.ConfigurationException;
Krzysztof Daniel a75b68c
- import org.osgi.service.cm.ManagedServiceFactory;
Krzysztof Daniel a75b68c
-@@ -98,12 +101,12 @@
Krzysztof Daniel a75b68c
- 		if (otherInfo != null)
Krzysztof Daniel a75b68c
- 			holder.setInitParameter(JettyConstants.OTHER_INFO, otherInfo);
Krzysztof Daniel a75b68c
- 
Krzysztof Daniel a75b68c
--		Context httpContext = createHttpContext(dictionary);
Krzysztof Daniel a75b68c
-+		ServletContextHandler httpContext = createHttpContext(dictionary);
Krzysztof Daniel a75b68c
- 		if (null != customizer)
Krzysztof Daniel a75b68c
--			httpContext = (Context) customizer.customizeContext(httpContext, dictionary);
Krzysztof Daniel a75b68c
-+			httpContext = (ServletContextHandler) customizer.customizeContext(httpContext, dictionary);
Krzysztof Daniel a75b68c
- 
Krzysztof Daniel a75b68c
- 		httpContext.addServlet(holder, "/*"); //$NON-NLS-1$
Krzysztof Daniel a75b68c
--		server.addHandler(httpContext);
Krzysztof Daniel a75b68c
-+		server.setHandler(httpContext);
Krzysztof Daniel a75b68c
- 
Krzysztof Daniel a75b68c
- 		try {
Krzysztof Daniel a75b68c
- 			server.start();
Krzysztof Daniel a75b68c
-@@ -241,8 +244,8 @@
Krzysztof Daniel a75b68c
- 		return sslConnector;
Krzysztof Daniel a75b68c
- 	}
Krzysztof Daniel a75b68c
- 
Krzysztof Daniel a75b68c
--	private Context createHttpContext(Dictionary dictionary) {
Krzysztof Daniel a75b68c
--		Context httpContext = new Context();
Krzysztof Daniel a75b68c
-+	private ServletContextHandler createHttpContext(Dictionary dictionary) {
Krzysztof Daniel a75b68c
-+		ServletContextHandler httpContext = new ServletContextHandler();
Krzysztof Daniel a75b68c
- 		httpContext.setAttribute(INTERNAL_CONTEXT_CLASSLOADER, Thread.currentThread().getContextClassLoader());
Krzysztof Daniel a75b68c
- 		httpContext.setClassLoader(this.getClass().getClassLoader());
Krzysztof Daniel a75b68c
- 
Krzysztof Daniel a75b68c
-Index: src/org/slf4j/Logger.java
Krzysztof Daniel a75b68c
-===================================================================
Krzysztof Daniel a75b68c
-RCS file: /cvsroot/rt/org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty6/src/org/slf4j/Logger.java,v
Krzysztof Daniel a75b68c
-retrieving revision 1.2
Krzysztof Daniel a75b68c
-diff -u -r1.2 Logger.java
Krzysztof Daniel a75b68c
---- src/org/slf4j/Logger.java	17 Apr 2009 20:24:43 -0000	1.2
Krzysztof Daniel a75b68c
-+++ src/org/slf4j/Logger.java	16 Apr 2010 21:35:58 -0000
Krzysztof Daniel a75b68c
-@@ -10,8 +10,8 @@
Krzysztof Daniel a75b68c
-  *******************************************************************************/
Krzysztof Daniel a75b68c
- package org.slf4j;
Krzysztof Daniel a75b68c
- 
Krzysztof Daniel a75b68c
--import org.mortbay.log.Log;
Krzysztof Daniel a75b68c
--import org.mortbay.log.StdErrLog;
Krzysztof Daniel a75b68c
-+import org.eclipse.jetty.util.log.Log;
Krzysztof Daniel a75b68c
-+import org.eclipse.jetty.util.log.StdErrLog;
Krzysztof Daniel a75b68c
- 
Krzysztof Daniel a75b68c
- // NOTE: This class is not a real SLF4J implementation and MUST NOT be exported as a general implementation!
Krzysztof Daniel a75b68c
- // It is a place-holder to allow overriding the default logging done in Jetty
Krzysztof Daniel a75b68c
-@@ -80,7 +80,7 @@
Krzysztof Daniel a75b68c
- 			setDebugEnabled(true);
Krzysztof Daniel a75b68c
- 	}
Krzysztof Daniel a75b68c
- 
Krzysztof Daniel a75b68c
--	public org.mortbay.log.Logger getLogger(String name) {
Krzysztof Daniel a75b68c
-+	public org.eclipse.jetty.util.log.Logger getLogger(String name) {
Krzysztof Daniel a75b68c
- 		if ((name == null && this.localName == null) || (name != null && name.equals(this.localName)))
Krzysztof Daniel a75b68c
- 			return this;
Krzysztof Daniel a75b68c
- 		return new Logger(name);
Mat Booth 39a3b2a
--- rt.equinox.bundles/bundles/org.eclipse.equinox.http.jetty8/src/org/eclipse/equinox/http/jetty/internal/EquinoxStdErrLog.java.orig	2014-03-24 10:46:20.000000000 +0000
Mat Booth 39a3b2a
+++ rt.equinox.bundles/bundles/org.eclipse.equinox.http.jetty8/src/org/eclipse/equinox/http/jetty/internal/EquinoxStdErrLog.java	2014-03-24 14:59:31.662164402 +0000
Mat Booth 39a3b2a
@@ -169,6 +169,12 @@ public class EquinoxStdErrLog implements Logger {
Mat Booth 39a3b2a
 		realLogger.debug(thrown);
Mat Booth 39a3b2a
 	}
Mat Booth 39a3b2a
Mat Booth 39a3b2a
+	public void debug(String msg, long value) {
Mat Booth 39a3b2a
+		if (threshold > DEBUG)
Mat Booth 39a3b2a
+			return;
Mat Booth 39a3b2a
+		realLogger.debug(msg, value);
Mat Booth 39a3b2a
+	}
Mat Booth 39a3b2a
+
Mat Booth 39a3b2a
 	public void ignore(Throwable ignored) {
Mat Booth 39a3b2a
 		// Just post this to debug
Mat Booth 39a3b2a
 		debug(ignored);
Mat Booth 39a3b2a
--- rt.equinox.bundles/bundles/org.eclipse.equinox.http.jetty8/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java.orig	2014-03-24 10:46:20.000000000 +0000
Mat Booth 39a3b2a
+++ rt.equinox.bundles/bundles/org.eclipse.equinox.http.jetty8/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java	2014-03-24 14:59:31.662164402 +0000
Krzysztof Daniel a75b68c
@@ -18,21 +18,21 @@
Krzysztof Daniel a75b68c
 import org.eclipse.equinox.http.jetty.JettyConstants;
Krzysztof Daniel a75b68c
 import org.eclipse.equinox.http.jetty.JettyCustomizer;
Krzysztof Daniel a75b68c
 import org.eclipse.equinox.http.servlet.HttpServiceServlet;
Krzysztof Daniel a75b68c
-import org.eclipse.jetty.server.Connector;
Krzysztof Daniel a75b68c
-import org.eclipse.jetty.server.Server;
Krzysztof Daniel a75b68c
-import org.eclipse.jetty.server.bio.SocketConnector;
Krzysztof Daniel a75b68c
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
Krzysztof Daniel a75b68c
+import org.eclipse.jetty.server.*;
Krzysztof Daniel a75b68c
 import org.eclipse.jetty.server.session.HashSessionManager;
Krzysztof Daniel a75b68c
 import org.eclipse.jetty.server.session.SessionHandler;
Krzysztof Daniel a75b68c
-import org.eclipse.jetty.server.ssl.SslSocketConnector;
Krzysztof Daniel a75b68c
 import org.eclipse.jetty.servlet.ServletContextHandler;
Krzysztof Daniel a75b68c
 import org.eclipse.jetty.servlet.ServletHolder;
Krzysztof Daniel a75b68c
+import org.eclipse.jetty.util.ssl.SslContextFactory;
Krzysztof Daniel a75b68c
 import org.osgi.framework.Constants;
Krzysztof Daniel a75b68c
 import org.osgi.service.cm.ConfigurationException;
Krzysztof Daniel a75b68c
 import org.osgi.service.cm.ManagedServiceFactory;
Krzysztof Daniel a75b68c
 
Krzysztof Daniel a75b68c
 public class HttpServerManager implements ManagedServiceFactory {
Krzysztof Daniel a75b68c
 
Krzysztof Daniel a75b68c
+	private static final String HTTP_1_1 = "http/1.1"; //$NON-NLS-1$
Krzysztof Daniel a75b68c
+	private static final int DEFAULT_IDLE_TIMEOUT = 30000;
Krzysztof Daniel a75b68c
+	private static final String HTTPS = "https"; //$NON-NLS-1$
Krzysztof Daniel a75b68c
 	private static final String CONTEXT_TEMPDIR = "javax.servlet.context.tempdir"; //$NON-NLS-1$
Krzysztof Daniel a75b68c
 	private static final String DIR_PREFIX = "pid_"; //$NON-NLS-1$
Krzysztof Daniel a75b68c
 	private static final String INTERNAL_CONTEXT_CLASSLOADER = "org.eclipse.equinox.http.jetty.internal.ContextClassLoader"; //$NON-NLS-1$
Mat Booth 39a3b2a
@@ -68,18 +68,38 @@
Krzysztof Daniel a75b68c
 
Krzysztof Daniel a75b68c
 		JettyCustomizer customizer = createJettyCustomizer(dictionary);
Krzysztof Daniel a75b68c
 
Krzysztof Daniel a75b68c
-		Connector httpConnector = createHttpConnector(dictionary);
Krzysztof Daniel a75b68c
+		/**
Krzysztof Daniel a75b68c
+		 * May be modified by createHttp(s)Connector.
Krzysztof Daniel a75b68c
+		 */
Krzysztof Daniel a75b68c
+		HttpConfiguration http_config = new HttpConfiguration();
Mat Booth 39a3b2a
+
Krzysztof Daniel a75b68c
+		ServerConnector httpConnector = createHttpConnector(dictionary, server, http_config);
Krzysztof Daniel a75b68c
+
Krzysztof Daniel a75b68c
+		ServerConnector httpsConnector = createHttpsConnector(dictionary, server, http_config);
Krzysztof Daniel a75b68c
+
Mat Booth 39a3b2a
 		if (null != customizer)
Mat Booth 39a3b2a
-			httpConnector = (Connector) customizer.customizeHttpConnector(httpConnector, dictionary);
Krzysztof Daniel a75b68c
+			httpConnector = (ServerConnector) customizer.customizeHttpConnector(httpConnector, dictionary);
Mat Booth 39a3b2a
 
Mat Booth 39a3b2a
-		if (httpConnector != null)
Krzysztof Daniel a75b68c
+		if (httpConnector != null) {
Krzysztof Daniel a75b68c
+			try {
Krzysztof Daniel a75b68c
+				httpConnector.open();
Krzysztof Daniel a75b68c
+			} catch (IOException e) {
Krzysztof Daniel a75b68c
+				e.printStackTrace();
Krzysztof Daniel a75b68c
+			}
Krzysztof Daniel a75b68c
 			server.addConnector(httpConnector);
Krzysztof Daniel a75b68c
+		}
Krzysztof Daniel a75b68c
 
Krzysztof Daniel a75b68c
-		Connector httpsConnector = createHttpsConnector(dictionary);
Krzysztof Daniel a75b68c
 		if (null != customizer)
Krzysztof Daniel a75b68c
-			httpsConnector = (Connector) customizer.customizeHttpsConnector(httpsConnector, dictionary);
Krzysztof Daniel a75b68c
-		if (httpsConnector != null)
Krzysztof Daniel a75b68c
+			httpsConnector = (ServerConnector) customizer.customizeHttpsConnector(httpsConnector, dictionary);
Krzysztof Daniel a75b68c
+
Krzysztof Daniel a75b68c
+		if (httpsConnector != null) {
Krzysztof Daniel a75b68c
+			try {
Krzysztof Daniel a75b68c
+				httpsConnector.open();
Krzysztof Daniel a75b68c
+			} catch (IOException e) {
Krzysztof Daniel a75b68c
+				e.printStackTrace();
Krzysztof Daniel a75b68c
+			}
Krzysztof Daniel a75b68c
 			server.addConnector(httpsConnector);
Krzysztof Daniel a75b68c
+		}
Krzysztof Daniel a75b68c
 
Krzysztof Daniel a75b68c
 		ServletHolder holder = new ServletHolder(new InternalHttpServiceServlet());
Krzysztof Daniel a75b68c
 		holder.setInitOrder(0);
Mat Booth 39a3b2a
@@ -111,11 +131,76 @@
Krzysztof Daniel a75b68c
 		try {
Krzysztof Daniel a75b68c
 			server.start();
Krzysztof Daniel a75b68c
 		} catch (Exception e) {
Krzysztof Daniel a75b68c
-			throw new ConfigurationException(pid, e.getMessage(), e);
Krzysztof Daniel a75b68c
+			//throw new ConfigurationException(pid, e.getMessage(), e);
Krzysztof Daniel a75b68c
 		}
Krzysztof Daniel a75b68c
 		servers.put(pid, server);
Mat Booth 39a3b2a
 	}
Mat Booth 39a3b2a
 
Krzysztof Daniel a75b68c
+	private ServerConnector createHttpsConnector(@SuppressWarnings("rawtypes") Dictionary dictionary, Server server, HttpConfiguration http_config) {
Krzysztof Daniel a75b68c
+		ServerConnector httpsConnector = null;
Krzysztof Daniel a75b68c
+		if (isHttpsEnabled(dictionary)) {
Krzysztof Daniel a75b68c
+			// SSL Context Factory for HTTPS and SPDY
Krzysztof Daniel a75b68c
+			SslContextFactory sslContextFactory = new SslContextFactory();
Krzysztof Daniel a75b68c
+			//sslContextFactory.setKeyStore(KeyS)
Krzysztof Daniel a75b68c
+			//Not sure if the next tree are properly migrated from jetty 8...
Krzysztof Daniel a75b68c
+			sslContextFactory.setKeyStorePath((String) dictionary.get(JettyConstants.SSL_KEYSTORE));
Krzysztof Daniel a75b68c
+			sslContextFactory.setKeyStorePassword((String) dictionary.get(JettyConstants.SSL_PASSWORD));
Krzysztof Daniel a75b68c
+			sslContextFactory.setKeyManagerPassword((String) dictionary.get(JettyConstants.SSL_KEYPASSWORD));
Krzysztof Daniel a75b68c
+
Krzysztof Daniel a75b68c
+			String keystoreType = (String) dictionary.get(JettyConstants.SSL_KEYSTORETYPE);
Krzysztof Daniel a75b68c
+			if (keystoreType != null) {
Krzysztof Daniel a75b68c
+				sslContextFactory.setKeyStoreType(keystoreType);
Krzysztof Daniel a75b68c
+			}
Krzysztof Daniel a75b68c
+
Krzysztof Daniel a75b68c
+			String protocol = (String) dictionary.get(JettyConstants.SSL_PROTOCOL);
Krzysztof Daniel a75b68c
+			if (protocol != null) {
Krzysztof Daniel a75b68c
+				sslContextFactory.setProtocol(protocol);
Krzysztof Daniel a75b68c
+			}
Krzysztof Daniel a75b68c
+
Krzysztof Daniel a75b68c
+			Object wantClientAuth = dictionary.get(JettyConstants.SSL_WANTCLIENTAUTH);
Krzysztof Daniel a75b68c
+			if (wantClientAuth != null) {
Krzysztof Daniel a75b68c
+				if (wantClientAuth instanceof String)
Krzysztof Daniel a75b68c
+					wantClientAuth = Boolean.valueOf((String) wantClientAuth);
Krzysztof Daniel a75b68c
+
Krzysztof Daniel a75b68c
+				sslContextFactory.setWantClientAuth((Boolean) wantClientAuth);
Krzysztof Daniel a75b68c
+			}
Krzysztof Daniel a75b68c
+
Krzysztof Daniel a75b68c
+			Object needClientAuth = dictionary.get(JettyConstants.SSL_NEEDCLIENTAUTH);
Krzysztof Daniel a75b68c
+			if (needClientAuth != null) {
Krzysztof Daniel a75b68c
+				if (needClientAuth instanceof String)
Krzysztof Daniel a75b68c
+					needClientAuth = Boolean.valueOf((String) needClientAuth);
Krzysztof Daniel a75b68c
+
Krzysztof Daniel a75b68c
+				sslContextFactory.setNeedClientAuth(((Boolean) needClientAuth));
Krzysztof Daniel a75b68c
+			}
Krzysztof Daniel a75b68c
+
Krzysztof Daniel a75b68c
+			// HTTPS Configuration
Krzysztof Daniel a75b68c
+			HttpConfiguration https_config = new HttpConfiguration(http_config);
Krzysztof Daniel a75b68c
+			https_config.addCustomizer(new SecureRequestCustomizer());
Krzysztof Daniel a75b68c
+
Krzysztof Daniel a75b68c
+			// HTTPS connector
Krzysztof Daniel a75b68c
+			httpsConnector = new ServerConnector(server, new SslConnectionFactory(sslContextFactory, HTTP_1_1), new HttpConnectionFactory(https_config));
Krzysztof Daniel a75b68c
+			httpsConnector.setPort(getIntProperty(dictionary, JettyConstants.HTTPS_PORT));
Krzysztof Daniel a75b68c
+		}
Krzysztof Daniel a75b68c
+		return httpsConnector;
Krzysztof Daniel a75b68c
+	}
Krzysztof Daniel a75b68c
+
Krzysztof Daniel a75b68c
+	private ServerConnector createHttpConnector(@SuppressWarnings("rawtypes") Dictionary dictionary, Server server, HttpConfiguration http_config) {
Krzysztof Daniel a75b68c
+		ServerConnector httpConnector = null;
Krzysztof Daniel a75b68c
+		if (isHttpEnabled(dictionary)) {
Krzysztof Daniel a75b68c
+			// HTTP Configuration
Krzysztof Daniel a75b68c
+			if (isHttpsEnabled(dictionary)) {
Krzysztof Daniel a75b68c
+				http_config.setSecureScheme(HTTPS);
Krzysztof Daniel a75b68c
+				http_config.setSecurePort(getIntProperty(dictionary, JettyConstants.HTTPS_PORT));
Krzysztof Daniel a75b68c
+			}
Krzysztof Daniel a75b68c
+			// HTTP connector
Krzysztof Daniel a75b68c
+			httpConnector = new ServerConnector(server, new HttpConnectionFactory(http_config));
Krzysztof Daniel a75b68c
+			httpConnector.setPort(getIntProperty(dictionary, JettyConstants.HTTP_PORT));
Krzysztof Daniel a75b68c
+			httpConnector.setHost((String) dictionary.get(JettyConstants.HTTP_HOST));
Krzysztof Daniel a75b68c
+			httpConnector.setIdleTimeout(DEFAULT_IDLE_TIMEOUT);
Krzysztof Daniel a75b68c
+		}
Krzysztof Daniel a75b68c
+		return httpConnector;
Mat Booth 39a3b2a
+	}
Mat Booth 39a3b2a
+
Krzysztof Daniel a75b68c
 	public synchronized void shutdown() throws Exception {
Mat Booth 39a3b2a
 		for (Iterator<Server> it = servers.values().iterator(); it.hasNext();) {
Mat Booth 39a3b2a
 			Server server = it.next();
Mat Booth 39a3b2a
@@ -124,155 +209,46 @@
Krzysztof Daniel a75b68c
 		servers.clear();
Krzysztof Daniel a75b68c
 	}
Krzysztof Daniel a75b68c
 
Krzysztof Daniel a75b68c
-	private Connector createHttpConnector(@SuppressWarnings("rawtypes") Dictionary dictionary) {
Krzysztof Daniel a75b68c
-		Boolean httpEnabled = null;
Krzysztof Daniel a75b68c
-		Object httpEnabledObj = dictionary.get(JettyConstants.HTTP_ENABLED);
Mat Booth 39a3b2a
-		if (httpEnabledObj instanceof Boolean) {
Mat Booth 39a3b2a
-			httpEnabled = (Boolean) httpEnabledObj;
Mat Booth 39a3b2a
-		} else if (httpEnabledObj instanceof String) {
Mat Booth 39a3b2a
-			httpEnabled = Boolean.parseBoolean(httpEnabledObj.toString());
Krzysztof Daniel a75b68c
-		}
Krzysztof Daniel a75b68c
-		if (httpEnabled != null && !httpEnabled.booleanValue())
Krzysztof Daniel a75b68c
-			return null;
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
+	private Integer getIntProperty(@SuppressWarnings("rawtypes") Dictionary dictionary, String property) {
Krzysztof Daniel a75b68c
 		Integer httpPort = null;
Krzysztof Daniel a75b68c
-		Object httpPortObj = dictionary.get(JettyConstants.HTTP_PORT);
Krzysztof Daniel a75b68c
+		Object httpPortObj = dictionary.get(property);
Mat Booth 39a3b2a
 		if (httpPortObj instanceof Integer) {
Krzysztof Daniel a75b68c
 			httpPort = (Integer) httpPortObj;
Mat Booth 39a3b2a
 		} else if (httpPortObj instanceof String) {
Mat Booth 39a3b2a
 			httpPort = Integer.valueOf(httpPortObj.toString());
Krzysztof Daniel a75b68c
 		}
Krzysztof Daniel a75b68c
-		if (httpPort == null)
Krzysztof Daniel a75b68c
-			return null;
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		Boolean nioEnabled = null;
Krzysztof Daniel a75b68c
-		Object nioEnabledObj = dictionary.get(JettyConstants.HTTP_NIO);
Mat Booth 39a3b2a
-		if (nioEnabledObj instanceof Boolean) {
Mat Booth 39a3b2a
-			nioEnabled = (Boolean) nioEnabledObj;
Mat Booth 39a3b2a
-		} else if (nioEnabledObj instanceof String) {
Mat Booth 39a3b2a
-			nioEnabled = Boolean.parseBoolean(nioEnabledObj.toString());
Mat Booth 39a3b2a
-		}
Krzysztof Daniel a75b68c
-		if (nioEnabled == null)
Krzysztof Daniel a75b68c
-			nioEnabled = getDefaultNIOEnablement();
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		Connector connector;
Krzysztof Daniel a75b68c
-		if (nioEnabled.booleanValue())
Krzysztof Daniel a75b68c
-			connector = new SelectChannelConnector();
Krzysztof Daniel a75b68c
-		else
Krzysztof Daniel a75b68c
-			connector = new SocketConnector();
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		connector.setPort(httpPort.intValue());
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		String httpHost = (String) dictionary.get(JettyConstants.HTTP_HOST);
Krzysztof Daniel a75b68c
-		if (httpHost != null) {
Krzysztof Daniel a75b68c
-			connector.setHost(httpHost);
Krzysztof Daniel a75b68c
-		}
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		if (connector.getPort() == 0) {
Krzysztof Daniel a75b68c
-			try {
Krzysztof Daniel a75b68c
-				connector.open();
Krzysztof Daniel a75b68c
-			} catch (IOException e) {
Krzysztof Daniel a75b68c
-				// this would be unexpected since we're opening the next available port 
Krzysztof Daniel a75b68c
-				e.printStackTrace();
Krzysztof Daniel a75b68c
-			}
Mat Booth 39a3b2a
+		if (httpPort == null) {
Mat Booth 39a3b2a
+			throw new IllegalArgumentException("Expected " + property + "property, but it is not set."); //$NON-NLS-1$//$NON-NLS-2$
Mat Booth 39a3b2a
 		}
Krzysztof Daniel a75b68c
-		return connector;
Krzysztof Daniel a75b68c
+		return httpPort;
Krzysztof Daniel a75b68c
 	}
Krzysztof Daniel a75b68c
 
Krzysztof Daniel a75b68c
-	private Boolean getDefaultNIOEnablement() {
Krzysztof Daniel a75b68c
-		Properties systemProperties = System.getProperties();
Krzysztof Daniel a75b68c
-		String javaVendor = systemProperties.getProperty("java.vendor", ""); //$NON-NLS-1$ //$NON-NLS-2$
Krzysztof Daniel a75b68c
-		if (javaVendor.equals("IBM Corporation")) { //$NON-NLS-1$
Krzysztof Daniel a75b68c
-			String javaVersion = systemProperties.getProperty("java.version", ""); //$NON-NLS-1$ //$NON-NLS-2$
Krzysztof Daniel a75b68c
-			if (javaVersion.startsWith("1.4")) //$NON-NLS-1$
Krzysztof Daniel a75b68c
-				return Boolean.FALSE;
Krzysztof Daniel a75b68c
-			// Note: no problems currently logged with 1.5
Krzysztof Daniel a75b68c
-			if (javaVersion.equals("1.6.0")) { //$NON-NLS-1$
Krzysztof Daniel a75b68c
-				String jclVersion = systemProperties.getProperty("java.jcl.version", ""); //$NON-NLS-1$ //$NON-NLS-2$
Krzysztof Daniel a75b68c
-				if (jclVersion.startsWith("2007")) //$NON-NLS-1$
Krzysztof Daniel a75b68c
-					return Boolean.FALSE;
Krzysztof Daniel a75b68c
-				if (jclVersion.startsWith("2008") && !jclVersion.startsWith("200811") && !jclVersion.startsWith("200812")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
Krzysztof Daniel a75b68c
-					return Boolean.FALSE;
Krzysztof Daniel a75b68c
-			}
Krzysztof Daniel a75b68c
+	/**
Krzysztof Daniel a75b68c
+	 * If not configured -> enable
Krzysztof Daniel a75b68c
+	 */
Krzysztof Daniel a75b68c
+	private boolean isHttpEnabled(@SuppressWarnings("rawtypes") Dictionary dictionary) {
Krzysztof Daniel a75b68c
+		Boolean httpEnabled = true;
Krzysztof Daniel a75b68c
+		Object httpEnabledObj = dictionary.get(JettyConstants.HTTP_ENABLED);
Krzysztof Daniel a75b68c
+		if (httpEnabledObj instanceof Boolean) {
Krzysztof Daniel a75b68c
+			httpEnabled = (Boolean) httpEnabledObj;
Krzysztof Daniel a75b68c
+		} else if (httpEnabledObj instanceof String) {
Krzysztof Daniel a75b68c
+			httpEnabled = Boolean.parseBoolean(httpEnabledObj.toString());
Krzysztof Daniel a75b68c
 		}
Krzysztof Daniel a75b68c
-		return Boolean.TRUE;
Krzysztof Daniel a75b68c
+		return httpEnabled;
Krzysztof Daniel a75b68c
 	}
Krzysztof Daniel a75b68c
 
Krzysztof Daniel a75b68c
-	@SuppressWarnings("deprecation")
Krzysztof Daniel a75b68c
-	private Connector createHttpsConnector(@SuppressWarnings("rawtypes") Dictionary dictionary) {
Krzysztof Daniel a75b68c
-		Boolean httpsEnabled = null;
Krzysztof Daniel a75b68c
+	/**
Krzysztof Daniel a75b68c
+	 * If not configured -> disable.
Krzysztof Daniel a75b68c
+	 */
Krzysztof Daniel a75b68c
+	private boolean isHttpsEnabled(@SuppressWarnings("rawtypes") Dictionary dictionary) {
Krzysztof Daniel a75b68c
+		Boolean httpsEnabled = false;
Krzysztof Daniel a75b68c
 		Object httpsEnabledObj = dictionary.get(JettyConstants.HTTPS_ENABLED);
Mat Booth 39a3b2a
 		if (httpsEnabledObj instanceof Boolean) {
Mat Booth 39a3b2a
 			httpsEnabled = (Boolean) httpsEnabledObj;
Mat Booth 39a3b2a
 		} else if (httpsEnabledObj instanceof String) {
Mat Booth 39a3b2a
 			httpsEnabled = Boolean.parseBoolean(httpsEnabledObj.toString());
Krzysztof Daniel a75b68c
 		}
Krzysztof Daniel a75b68c
-		if (httpsEnabled == null || !httpsEnabled.booleanValue())
Krzysztof Daniel a75b68c
-			return null;
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		Integer httpsPort = null;
Krzysztof Daniel a75b68c
-		Object httpsPortObj = dictionary.get(JettyConstants.HTTPS_PORT);
Mat Booth 39a3b2a
-		if (httpsPortObj instanceof Integer) {
Krzysztof Daniel a75b68c
-			httpsPort = (Integer) httpsPortObj;
Mat Booth 39a3b2a
-		} else if (httpsPortObj instanceof String) {
Mat Booth 39a3b2a
-			httpsPort = Integer.valueOf(httpsPortObj.toString());
Krzysztof Daniel a75b68c
-		}
Krzysztof Daniel a75b68c
-		if (httpsPort == null)
Krzysztof Daniel a75b68c
-			return null;
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		SslSocketConnector sslConnector = new SslSocketConnector();
Krzysztof Daniel a75b68c
-		sslConnector.setPort(httpsPort.intValue());
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		String httpsHost = (String) dictionary.get(JettyConstants.HTTPS_HOST);
Krzysztof Daniel a75b68c
-		if (httpsHost != null) {
Krzysztof Daniel a75b68c
-			sslConnector.setHost(httpsHost);
Krzysztof Daniel a75b68c
-		}
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		String keyStore = (String) dictionary.get(JettyConstants.SSL_KEYSTORE);
Krzysztof Daniel a75b68c
-		if (keyStore != null)
Krzysztof Daniel a75b68c
-			sslConnector.setKeystore(keyStore);
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		String password = (String) dictionary.get(JettyConstants.SSL_PASSWORD);
Krzysztof Daniel a75b68c
-		if (password != null)
Krzysztof Daniel a75b68c
-			sslConnector.setPassword(password);
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		String keyPassword = (String) dictionary.get(JettyConstants.SSL_KEYPASSWORD);
Krzysztof Daniel a75b68c
-		if (keyPassword != null)
Krzysztof Daniel a75b68c
-			sslConnector.setKeyPassword(keyPassword);
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		Object needClientAuth = dictionary.get(JettyConstants.SSL_NEEDCLIENTAUTH);
Krzysztof Daniel a75b68c
-		if (needClientAuth != null) {
Krzysztof Daniel a75b68c
-			if (needClientAuth instanceof String)
Krzysztof Daniel a75b68c
-				needClientAuth = Boolean.valueOf((String) needClientAuth);
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-			sslConnector.setNeedClientAuth(((Boolean) needClientAuth).booleanValue());
Krzysztof Daniel a75b68c
-		}
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		Object wantClientAuth = dictionary.get(JettyConstants.SSL_WANTCLIENTAUTH);
Krzysztof Daniel a75b68c
-		if (wantClientAuth != null) {
Krzysztof Daniel a75b68c
-			if (wantClientAuth instanceof String)
Krzysztof Daniel a75b68c
-				wantClientAuth = Boolean.valueOf((String) wantClientAuth);
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-			sslConnector.setWantClientAuth(((Boolean) wantClientAuth).booleanValue());
Krzysztof Daniel a75b68c
-		}
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		String protocol = (String) dictionary.get(JettyConstants.SSL_PROTOCOL);
Krzysztof Daniel a75b68c
-		if (protocol != null)
Krzysztof Daniel a75b68c
-			sslConnector.setProtocol(protocol);
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		String keystoreType = (String) dictionary.get(JettyConstants.SSL_KEYSTORETYPE);
Krzysztof Daniel a75b68c
-		if (keystoreType != null)
Krzysztof Daniel a75b68c
-			sslConnector.setKeystoreType(keystoreType);
Krzysztof Daniel a75b68c
-
Krzysztof Daniel a75b68c
-		if (sslConnector.getPort() == 0) {
Krzysztof Daniel a75b68c
-			try {
Krzysztof Daniel a75b68c
-				sslConnector.open();
Krzysztof Daniel a75b68c
-			} catch (IOException e) {
Krzysztof Daniel a75b68c
-				// this would be unexpected since we're opening the next available port 
Krzysztof Daniel a75b68c
-				e.printStackTrace();
Krzysztof Daniel a75b68c
-			}
Krzysztof Daniel a75b68c
-		}
Krzysztof Daniel a75b68c
-		return sslConnector;
Krzysztof Daniel a75b68c
+		return httpsEnabled;
Krzysztof Daniel a75b68c
 	}
Krzysztof Daniel a75b68c
 
Krzysztof Daniel a75b68c
 	private ServletContextHandler createHttpContext(@SuppressWarnings("rawtypes") Dictionary dictionary) {