Merge branch 'master' of ssh://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project

This commit is contained in:
Simone Bordet 2012-03-12 15:31:54 +01:00
commit 2f7f232d12
88 changed files with 442 additions and 273 deletions

View File

@ -1,6 +1,6 @@
jetty-7.6.3-SNAPSHOT
jetty-7.6.2.v20120302 - 02 March 2012
jetty-7.6.2.v20120308 - 08 March 2012
+ 370387 SafariWebsocketDraft0Test failure during build.
+ 371168 Update ClientCrossContextSessionTest
+ 372093 handle quotes in Require-Bundle manifest string
@ -9,7 +9,17 @@ jetty-7.6.2.v20120302 - 02 March 2012
will happen in the next major release (to avoid break implementers).
+ 372487 JDBCSessionManager does not work with Oracle
+ 372806 Command line should accept relative paths for xml config files
+ 373037 jetty.server.Response.setContentLength(int) should not close a Writer
when length=0
+ 373162 add improved implementation for getParameterMap(), needs a test
though and the existing setup doesn't seem like it would easily support the
needed test so need to do that still
+ 373306 Set default user agent extraction pattern for UserAgentFilter
+ 373567 cert validation issue with ocsp and crldp always being enabled when
validating turned on fixed
+ JETTY-1409 GzipFilter will double-compress application/x-gzip content
+ JETTY-1489 WebAppProvider attempts to deploy .svn folder
+ JETTY-1494 .
jetty-7.6.1.v20120215 - 15 February 2012
+ 369121 simplified test

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>example-jetty-embedded</artifactId>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-aggregate-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-all-server</artifactId>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-aggregate-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-all</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-aggregate-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-client</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-aggregate-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-plus</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-aggregate-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-server</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-aggregate-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-servlet</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-aggregate-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-webapp</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-aggregate-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-websocket</artifactId>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-aggregate-project</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-ajp</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-annotations</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -39,7 +39,7 @@ import org.eclipse.jetty.util.security.Constraint;
import org.eclipse.jetty.util.security.Credential;
import org.eclipse.jetty.util.ssl.SslContextFactory;
public class SslCertSecuredExchangeTest extends ContentExchangeTest
public class SslCertSecuredExchangeTest// extends ContentExchangeTest
{
// certificate is valid until Jan 1, 2050
private String _keypath = MavenTestingUtils.getTargetFile("test-policy/validation/jetty-valid.keystore").getAbsolutePath();
@ -51,7 +51,7 @@ public class SslCertSecuredExchangeTest extends ContentExchangeTest
protected void configureServer(Server server)
throws Exception
{
setProtocol("https");
//setProtocol("https");
SslSelectChannelConnector connector = new SslSelectChannelConnector();
SslContextFactory cf = connector.getSslContextFactory();
@ -139,31 +139,31 @@ public class SslCertSecuredExchangeTest extends ContentExchangeTest
ServletContextHandler root = new ServletContextHandler();
root.setContextPath("/");
root.setResourceBase(getBasePath());
// root.setResourceBase(getBasePath());
ServletHolder servletHolder = new ServletHolder( new DefaultServlet() );
servletHolder.setInitParameter( "gzip", "true" );
root.addServlet( servletHolder, "/*" );
Handler handler = new TestHandler(getBasePath());
// Handler handler = new TestHandler(getBasePath());
HandlerCollection handlers = new HandlerCollection();
handlers.setHandlers(new Handler[]{handler, root});
// handlers.setHandlers(new Handler[]{handler, root});
security.setHandler(handlers);
}
@Override
protected void configureClient(HttpClient client) throws Exception
{
SslContextFactory cf = client.getSslContextFactory();
cf.setValidateCerts(true);
cf.setCrlPath(_crlpath);
cf.setCertAlias("client");
cf.setKeyStorePath(_clientpath);
cf.setKeyStorePassword(_password);
cf.setKeyManagerPassword(_password);
cf.setTrustStore(_trustpath);
cf.setTrustStorePassword(_password);
}
// @Override
// protected void configureClient(HttpClient client) throws Exception
// {
// SslContextFactory cf = client.getSslContextFactory();
// cf.setValidateCerts(true);
// cf.setCrlPath(_crlpath);
//
// cf.setCertAlias("client");
// cf.setKeyStorePath(_clientpath);
// cf.setKeyStorePassword(_password);
// cf.setKeyManagerPassword(_password);
//
// cf.setTrustStore(_trustpath);
// cf.setTrustStorePassword(_password);
// }
}

View File

@ -17,7 +17,7 @@ import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
import org.eclipse.jetty.util.security.CertificateUtils;
import org.eclipse.jetty.util.ssl.SslContextFactory;
public abstract class SslValidationTestBase extends ContentExchangeTest
public abstract class SslValidationTestBase //extends ContentExchangeTest
{
protected static Class<? extends SslConnector> __klass;
protected static int __konnector;
@ -29,70 +29,70 @@ public abstract class SslValidationTestBase extends ContentExchangeTest
private String _crlpath = MavenTestingUtils.getTargetFile("test-policy/validation/crlfile.pem").getAbsolutePath();
private String _password = "OBF:1wnl1sw01ta01z0f1tae1svy1wml";
@Override
protected void configureServer(Server server)
throws Exception
{
setProtocol("https");
SslContextFactory srvFactory = new SslContextFactory() {
@Override
protected KeyStore getKeyStore(InputStream storeStream, String storePath, String storeType, String storeProvider, String storePassword) throws Exception
{
return CertificateUtils.getKeyStore(storeStream, storePath, storeType, storeProvider, storePassword);
}
@Override
protected Collection<? extends CRL> loadCRL(String crlPath) throws Exception
{
return CertificateUtils.loadCRL(crlPath);
}
};
srvFactory.setValidateCerts(true);
srvFactory.setCrlPath(_crlpath);
srvFactory.setNeedClientAuth(true);
srvFactory.setKeyStorePath(_keypath);
srvFactory.setKeyStorePassword(_password);
srvFactory.setKeyManagerPassword(_password);
srvFactory.setTrustStore(_trustpath);
srvFactory.setTrustStorePassword(_password);
Constructor<? extends SslConnector> constructor = __klass.getConstructor(SslContextFactory.class);
SslConnector connector = constructor.newInstance(srvFactory);
connector.setMaxIdleTime(5000);
server.addConnector(connector);
Handler handler = new TestHandler(getBasePath());
ServletContextHandler root = new ServletContextHandler();
root.setContextPath("/");
root.setResourceBase(getBasePath());
ServletHolder servletHolder = new ServletHolder( new DefaultServlet() );
servletHolder.setInitParameter( "gzip", "true" );
root.addServlet( servletHolder, "/*" );
HandlerCollection handlers = new HandlerCollection();
handlers.setHandlers(new Handler[]{handler, root});
server.setHandler( handlers );
}
@Override
protected void configureClient(HttpClient client)
throws Exception
{
client.setConnectorType(__konnector);
SslContextFactory cf = client.getSslContextFactory();
cf.setValidateCerts(true);
cf.setCrlPath(_crlpath);
cf.setKeyStorePath(_clientpath);
cf.setKeyStorePassword(_password);
cf.setKeyManagerPassword(_password);
cf.setTrustStore(_trustpath);
cf.setTrustStorePassword(_password);
// setProtocol("https");
//
// SslContextFactory srvFactory = new SslContextFactory() {
// @Override
// protected KeyStore getKeyStore(InputStream storeStream, String storePath, String storeType, String storeProvider, String storePassword) throws Exception
// {
// return CertificateUtils.getKeyStore(storeStream, storePath, storeType, storeProvider, storePassword);
// }
//
// @Override
// protected Collection<? extends CRL> loadCRL(String crlPath) throws Exception
// {
// return CertificateUtils.loadCRL(crlPath);
// }
// };
// srvFactory.setValidateCerts(true);
// srvFactory.setCrlPath(_crlpath);
// srvFactory.setNeedClientAuth(true);
//
// srvFactory.setKeyStorePath(_keypath);
// srvFactory.setKeyStorePassword(_password);
// srvFactory.setKeyManagerPassword(_password);
//
// srvFactory.setTrustStore(_trustpath);
// srvFactory.setTrustStorePassword(_password);
//
// Constructor<? extends SslConnector> constructor = __klass.getConstructor(SslContextFactory.class);
// SslConnector connector = constructor.newInstance(srvFactory);
// connector.setMaxIdleTime(5000);
// server.addConnector(connector);
//
// Handler handler = new TestHandler(getBasePath());
//
// ServletContextHandler root = new ServletContextHandler();
// root.setContextPath("/");
// root.setResourceBase(getBasePath());
// ServletHolder servletHolder = new ServletHolder( new DefaultServlet() );
// servletHolder.setInitParameter( "gzip", "true" );
// root.addServlet( servletHolder, "/*" );
//
// HandlerCollection handlers = new HandlerCollection();
// handlers.setHandlers(new Handler[]{handler, root});
// server.setHandler( handlers );
// }
//
// @Override
// protected void configureClient(HttpClient client)
// throws Exception
// {
// client.setConnectorType(__konnector);
//
// SslContextFactory cf = client.getSslContextFactory();
// cf.setValidateCerts(true);
// cf.setCrlPath(_crlpath);
//
// cf.setKeyStorePath(_clientpath);
// cf.setKeyStorePassword(_password);
// cf.setKeyManagerPassword(_password);
//
// cf.setTrustStore(_trustpath);
// cf.setTrustStorePassword(_password);
}
}

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-continuation</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-deploy</artifactId>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<artifactId>jetty-distribution</artifactId>
<name>Jetty :: Distribution Assemblies</name>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-http-spi</artifactId>

View File

@ -3,7 +3,7 @@
<parent>
<artifactId>jetty-project</artifactId>
<groupId>org.eclipse.jetty</groupId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-http</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<artifactId>jetty-project</artifactId>
<groupId>org.eclipse.jetty</groupId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-io</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-jaspi</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-jmx</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-jndi</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-jsp</artifactId>

View File

@ -19,7 +19,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-monitor</artifactId>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<artifactId>jetty-nested</artifactId>
<name>Jetty :: Nested</name>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-nosql</artifactId>

View File

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: Jetty-OSGi-Jasper integration
Fragment-Host: org.eclipse.jetty.osgi.boot
Bundle-SymbolicName: org.eclipse.jetty.osgi.boot.jsp
Bundle-Version: 7.4.1.qualifier
Bundle-Version: 7.6.2.qualifier
Bundle-Vendor: Mort Bay Consulting
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: com.sun.el;resolution:=optional,
@ -22,15 +22,16 @@ Import-Package: com.sun.el;resolution:=optional,
javax.servlet.jsp.resources;version="2.1.0",
javax.servlet.jsp.tagext;version="2.1.0",
javax.servlet.resources;version="2.5.0",
org.apache.jasper;version="2.0.0";resolution:=optional,
org.apache.jasper.compiler;version="2.0.0";resolution:=optional,
org.apache.jasper.compiler.tagplugin;version="2.0.0";resolution:=optional,
org.apache.jasper.runtime;version="2.0.0";resolution:=optional,
org.apache.jasper.security;version="2.0.0";resolution:=optional,
org.apache.jasper.servlet;version="2.0.0";resolution:=optional,
org.apache.jasper.tagplugins.jstl;version="2.0.0";resolution:=optional,
org.apache.jasper.util;version="2.0.0";resolution:=optional,
org.apache.jasper.xmlparser;version="2.0.0";resolution:=optional,
org.apache.jasper;version="6.0.0";resolution:=optional,
org.apache.jasper.compiler;version="6.0.0";resolution:=optional,
org.apache.jasper.compiler.tagplugin;version="6.0.0";resolution:=optional,
org.apache.jasper.runtime;version="6.0.0";resolution:=optional,
org.apache.jasper.security;version="6.0.0";resolution:=optional,
org.apache.jasper.servlet;version="6.0.0";resolution:=optional,
org.apache.jasper.tagplugins.jstl;version="6.0.0";resolution:=optional,
org.apache.jasper.util;version="6.0.0";resolution:=optional,
org.apache.jasper.xmlparser;version="6.0.0";resolution:=optional,
org.glassfish.jsp.api;version="2.1.3";resolution:=optional,
org.apache.taglibs.standard;version="1.2.0";resolution:=optional,
org.apache.taglibs.standard.extra.spath;version="1.2.0";resolution:=optional,
org.apache.taglibs.standard.functions;version="1.2.0";resolution:=optional,

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.osgi</groupId>
<artifactId>jetty-osgi-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -168,6 +168,8 @@ public class WebappRegistrationCustomizerImpl implements WebappRegistrationCusto
return urls.toArray(new URL[urls.size()]);
}
/**
* Jasper resolves the dtd when it parses a taglib descriptor.
* It uses this code to do that: ParserUtils.getClass().getResourceAsStream(resourcePath); where
@ -182,7 +184,7 @@ public class WebappRegistrationCustomizerImpl implements WebappRegistrationCusto
* on a static friendly field :(
* </p>
*/
void fixupDtdResolution()
void fixupDtdResolution()
{
try
{
@ -214,12 +216,12 @@ public class WebappRegistrationCustomizerImpl implements WebappRegistrationCusto
Constants.WEBAPP_DTD_RESOURCE_PATH_22,
Constants.WEBAPP_DTD_RESOURCE_PATH_23, };
// static final String[] CACHED_SCHEMA_RESOURCE_PATHS = {
// Constants.TAGLIB_SCHEMA_RESOURCE_PATH_20,
// Constants.TAGLIB_SCHEMA_RESOURCE_PATH_21,
// Constants.WEBAPP_SCHEMA_RESOURCE_PATH_24,
// Constants.WEBAPP_SCHEMA_RESOURCE_PATH_25,
// };
static final String[] CACHED_SCHEMA_RESOURCE_PATHS = {
Constants.TAGLIB_SCHEMA_RESOURCE_PATH_20,
Constants.TAGLIB_SCHEMA_RESOURCE_PATH_21,
Constants.WEBAPP_SCHEMA_RESOURCE_PATH_24,
Constants.WEBAPP_SCHEMA_RESOURCE_PATH_25,
};
public InputSource resolveEntity(String publicId, String systemId) throws SAXException
{
for (int i = 0; i < CACHED_DTD_PUBLIC_IDS.length; i++)

View File

@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: Jetty-OSGi-Logback integration
Fragment-Host: org.eclipse.jetty.osgi.boot
Bundle-SymbolicName: org.eclipse.jetty.osgi.boot.logback;singleton:=true
Bundle-Version: 7.3.0.qualifier
Bundle-Version: 7.6.2.qualifier
Bundle-Vendor: Mort Bay Consulting
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: ch.qos.logback.classic,

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.osgi</groupId>
<artifactId>jetty-osgi-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Support for rfc66 war url scheme
Bundle-SymbolicName: org.eclipse.jetty.osgi.boot.warurl;singleton:=true
Bundle-Version: 7.3.0.qualifier
Bundle-Version: 7.6.2.qualifier
Bundle-Activator: org.eclipse.jetty.osgi.boot.warurl.WarUrlActivator
Bundle-Vendor: Mort Bay Consulting
Bundle-RequiredExecutionEnvironment: J2SE-1.5

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.osgi</groupId>
<artifactId>jetty-osgi-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: Jetty OSGi bootstrap
Bundle-SymbolicName: org.eclipse.jetty.osgi.boot;singleton:=true
Bundle-Vendor: Mort Bay Consulting
Bundle-Version: 7.4.3.qualifier
Bundle-Version: 7.6.2.qualifier
Bundle-Activator: org.eclipse.jetty.osgi.boot.JettyBootstrapActivator
Import-Package: javax.mail;version="1.4.0";resolution:=optional,
javax.mail.event;version="1.4.0";resolution:=optional,
@ -14,19 +14,19 @@ Import-Package: javax.mail;version="1.4.0";resolution:=optional,
javax.servlet.http;version="2.5.0",
javax.transaction;version="1.1.0";resolution:=optional,
javax.transaction.xa;version="1.1.0";resolution:=optional,
org.eclipse.jetty.deploy;version="7.4.0",
org.eclipse.jetty.deploy.providers;version="7.4.0",
org.eclipse.jetty.http;version="7.4.0",
org.eclipse.jetty.nested;version="7.4.0";resolution:=optional,
org.eclipse.jetty.server;version="7.4.0",
org.eclipse.jetty.server.handler;version="7.4.0",
org.eclipse.jetty.servlet;version="7.4.0",
org.eclipse.jetty.util;version="7.4.0",
org.eclipse.jetty.util.component;version="7.4.0",
org.eclipse.jetty.util.log;version="7.4.0",
org.eclipse.jetty.util.resource;version="7.4.0",
org.eclipse.jetty.webapp;version="7.4.1.v20110513",
org.eclipse.jetty.xml;version="7.4.0",
org.eclipse.jetty.deploy;version="7.6.2",
org.eclipse.jetty.deploy.providers;version="7.6.2",
org.eclipse.jetty.http;version="7.6.2",
org.eclipse.jetty.nested;version="7.6.2";resolution:=optional,
org.eclipse.jetty.server;version="7.6.2",
org.eclipse.jetty.server.handler;version="7.6.2",
org.eclipse.jetty.servlet;version="7.6.2",
org.eclipse.jetty.util;version="7.6.2",
org.eclipse.jetty.util.component;version="7.6.2",
org.eclipse.jetty.util.log;version="7.6.2",
org.eclipse.jetty.util.resource;version="7.6.2",
org.eclipse.jetty.webapp;version="7.6.2",
org.eclipse.jetty.xml;version="7.6.2",
org.osgi.framework,
org.osgi.service.cm;version="1.2.0",
org.osgi.service.packageadmin,
@ -40,7 +40,7 @@ Import-Package: javax.mail;version="1.4.0";resolution:=optional,
org.xml.sax.helpers
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Classpath: .
Export-Package: org.eclipse.jetty.osgi.boot;version="7.4.0",
org.eclipse.jetty.osgi.nested;version="7.4.0",
org.eclipse.jetty.osgi.boot.utils;version="7.4.0"
Export-Package: org.eclipse.jetty.osgi.boot;version="7.6.2",
org.eclipse.jetty.osgi.nested;version="7.6.2",
org.eclipse.jetty.osgi.boot.utils;version="7.6.2"
DynamicImport-Package: org.eclipse.jetty.*;version="[7.3,8)"

View File

@ -22,14 +22,6 @@
<Set name="minThreads">10</Set>
<Set name="maxThreads">200</Set>
</New>
<!-- Optional Java 5 bounded threadpool with job queue
<New class="org.eclipse.jetty.util.thread.ExecutorThreadPool">
<Arg name="coreSize" type="int">25</Arg>
<Arg name="maxSize" type="int">50</Arg>
<Arg name="maxIdleMs" type="long">30000</Arg>
</New>
-->
</Set>
@ -118,7 +110,7 @@
contain custom tag libraries (*.tld files)
if those bundles don't exist or can't be loaded no errors or warning will be issued!
this default value is to plug the tld files of the reference implementation of JSF -->
<Set name="tldBundles"><Property name="org.eclipse.jetty.osgi.tldsbundles"
<Set name="tldBundles"><Property name="org.eclipse.jetty.osgi.tldbundles"
default="javax.faces.jsf-impl" /></Set>
</New>
</Arg>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.osgi</groupId>
<artifactId>jetty-osgi-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -187,6 +187,9 @@ public class OSGiAppProvider extends ScanningAppProvider implements AppProvider
{
((WebAppContext)wah).setConfigurationClasses(_configurationClasses);
}
if (_defaultsDescriptor != null)
((WebAppContext)wah).setDefaultsDescriptor(_defaultsDescriptor);
return app.getContextHandler();
}

View File

@ -20,6 +20,7 @@ import java.util.Map;
import org.eclipse.jetty.osgi.boot.JettyBootstrapActivator;
import org.eclipse.jetty.osgi.boot.OSGiServerConstants;
import org.eclipse.jetty.osgi.boot.OSGiWebappConstants;
import org.eclipse.jetty.osgi.boot.internal.serverfactory.DefaultJettyAtJettyHomeHelper;
import org.eclipse.jetty.osgi.boot.internal.serverfactory.IManagedJettyServerRegistry;
import org.eclipse.jetty.osgi.boot.internal.serverfactory.ServerInstanceWrapper;
import org.eclipse.jetty.server.handler.ContextHandler;
@ -195,7 +196,21 @@ public class JettyContextHandlerServiceTracker implements ServiceListener
String defaultWebXmlPath = (String)sr.getProperty(OSGiWebappConstants.SERVICE_PROP_DEFAULT_WEB_XML_PATH);
if (defaultWebXmlPath == null)
{
defaultWebXmlPath = webapp.getDefaultsDescriptor();
String jettyHome = System.getProperty(DefaultJettyAtJettyHomeHelper.SYS_PROP_JETTY_HOME);
if (jettyHome != null)
{
File etc = new File(jettyHome, "etc");
if (etc.exists() && etc.isDirectory())
{
File webDefault = new File (etc, "webdefault.xml");
if (webDefault.exists())
defaultWebXmlPath = webDefault.getAbsolutePath();
else
defaultWebXmlPath = webapp.getDefaultsDescriptor();
}
else
defaultWebXmlPath = webapp.getDefaultsDescriptor();
}
}
String war = (String)sr.getProperty("war");
try

View File

@ -24,6 +24,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.TreeMap;
@ -50,6 +51,9 @@ import org.eclipse.jetty.webapp.WebInfConfiguration;
import org.eclipse.jetty.xml.XmlConfiguration;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleReference;
import org.osgi.service.packageadmin.PackageAdmin;
import org.osgi.util.tracker.ServiceTracker;
import org.xml.sax.SAXException;
/**
@ -173,6 +177,7 @@ public class WebBundleDeployerHelper implements IWebBundleDeployerHelper
overrideBundleInstallLocation);
File webapp = null;
URL baseWebappInstallURL = null;
if (webappFolderPath != null && webappFolderPath.length() != 0 && !webappFolderPath.equals("."))
{
if (webappFolderPath.startsWith("/") || webappFolderPath.startsWith("file:"))
@ -261,7 +266,7 @@ public class WebBundleDeployerHelper implements IWebBundleDeployerHelper
File defaultWebXml = null;
if (defaultWebXmlPath.startsWith("/") || defaultWebXmlPath.startsWith("file:/"))
{
defaultWebXml = new File(webXmlPath);
defaultWebXml = new File(defaultWebXmlPath);
}
else
{
@ -276,8 +281,9 @@ public class WebBundleDeployerHelper implements IWebBundleDeployerHelper
//other parameters that might be defines on the OSGiAppProvider:
context.setParentLoaderPriority(_wrapper.getOSGiAppProvider().isParentLoaderPriority());
configureWebappClassLoader(contributor,context,composite, requireTldBundle);
configureWebAppContext(context,contributor,requireTldBundle);
configureWebappClassLoader(contributor,context,composite);
// @see
// org.eclipse.jetty.webapp.JettyWebXmlConfiguration#configure(WebAppContext)
@ -450,7 +456,7 @@ public class WebBundleDeployerHelper implements IWebBundleDeployerHelper
//the actual registration must happen via the new Deployment API.
// _ctxtHandler.addHandler(context);
configureWebappClassLoader(contributor,context,composite);
configureWebappClassLoader(contributor,context,composite, requireTldBundle);
if (context instanceof WebAppContext)
{
webAppContext = (WebAppContext)context;
@ -615,8 +621,9 @@ public class WebBundleDeployerHelper implements IWebBundleDeployerHelper
}
while (tldEnum.hasMoreElements())
{
URL tldUrl = tldEnum.nextElement();
tldfrags.add(Resource.newResource(
DefaultFileLocatorHelper.getLocalURL(tldEnum.nextElement())));
DefaultFileLocatorHelper.getLocalURL(tldUrl)));
}
}
}
@ -764,13 +771,17 @@ public class WebBundleDeployerHelper implements IWebBundleDeployerHelper
* @param classInBundle
* @throws Exception
*/
protected void configureWebappClassLoader(Bundle contributor, ContextHandler context, OSGiWebappClassLoader webappClassLoader) throws Exception
protected void configureWebappClassLoader(Bundle contributor, ContextHandler context, OSGiWebappClassLoader webappClassLoader, String requireTldBundle) throws Exception
{
if (context instanceof WebAppContext)
{
WebAppContext webappCtxt = (WebAppContext)context;
context.setClassLoader(webappClassLoader);
webappClassLoader.setWebappContext(webappCtxt);
String pathsToRequiredBundles = getPathsToRequiredBundles(context, requireTldBundle);
if (pathsToRequiredBundles != null)
webappClassLoader.addClassPath(pathsToRequiredBundles);
}
else
{
@ -788,6 +799,18 @@ public class WebBundleDeployerHelper implements IWebBundleDeployerHelper
// know.
OSGiWebappClassLoader webappClassLoader = new OSGiWebappClassLoader(
_wrapper.getParentClassLoaderForWebapps(),new WebAppContext(),contributor,BUNDLE_CLASS_LOADER_HELPER);
/* DEBUG
try {
Class c = webappClassLoader.loadClass("org.glassfish.jsp.api.ResourceInjector");
System.err.println("LOADED org.glassfish.jsp.api.ResourceInjector from "+c.getClassLoader());
}
catch (Exception e) {e.printStackTrace();}
try {
Class c = webappClassLoader.loadClass("org.apache.jasper.xmlparser.ParserUtils");
System.err.println("LOADED org.apache.jasper.xmlparser.ParserUtils from "+c.getClassLoader());
}
catch (Exception e) {e.printStackTrace();}
*/
return webappClassLoader;
}
@ -812,4 +835,49 @@ public class WebBundleDeployerHelper implements IWebBundleDeployerHelper
}
private String getPathsToRequiredBundles (ContextHandler context, String requireTldBundle) throws Exception
{
if (requireTldBundle == null)
return null;
StringBuilder paths = new StringBuilder();
Bundle bundle = (Bundle)context.getAttribute(OSGiWebappConstants.JETTY_OSGI_BUNDLE);
PackageAdmin packAdmin = getBundleAdmin();
DefaultFileLocatorHelper fileLocatorHelper = new DefaultFileLocatorHelper();
String[] symbNames = requireTldBundle.split(", ");
for (String symbName : symbNames)
{
Bundle[] bs = packAdmin.getBundles(symbName, null);
if (bs == null || bs.length == 0)
{
throw new IllegalArgumentException("Unable to locate the bundle '"
+ symbName + "' specified in the "
+ OSGiWebappConstants.REQUIRE_TLD_BUNDLE
+ " of the manifest of "
+ bundle.getSymbolicName());
}
File f = fileLocatorHelper.getBundleInstallLocation(bs[0]);
if (paths.length() > 0)
paths.append(", ");
System.err.println("getPathsToRequiredBundles: bundle path="+bs[0].getLocation()+" uri="+f.toURI());
paths.append(f.toURI().toURL().toString());
}
return paths.toString();
}
private PackageAdmin getBundleAdmin()
{
Bundle bootBundle = ((BundleReference)OSGiWebappConstants.class.getClassLoader()).getBundle();
ServiceTracker serviceTracker = new ServiceTracker(bootBundle.getBundleContext(), PackageAdmin.class.getName(), null);
serviceTracker.open();
return (PackageAdmin) serviceTracker.getService();
}
}

View File

@ -3,20 +3,20 @@ Bundle-ManifestVersion: 2
Bundle-Name: Console
Bundle-SymbolicName: org.eclipse.jetty.osgi.equinoxtools
Bundle-Description: Example application: equinox console accesssible on the web
Bundle-Version: 7.4.2.qualifier
Bundle-Version: 7.6.2.qualifier
Bundle-Activator: org.eclipse.jetty.osgi.equinoxtools.WebEquinoxToolsActivator
Import-Package: javax.servlet;version="2.5.0",
javax.servlet.http;version="2.5.0",
org.eclipse.jetty.continuation;version="7.4.0",
org.eclipse.jetty.io;version="7.4.0",
org.eclipse.jetty.util;version="7.4.0",
org.eclipse.jetty.util.log;version="7.4.0",
org.eclipse.jetty.websocket;version="7.4.0",
org.eclipse.jetty.continuation;version="7.6.2",
org.eclipse.jetty.io;version="7.6.2",
org.eclipse.jetty.util;version="7.6.2",
org.eclipse.jetty.util.log;version="7.6.2",
org.eclipse.jetty.websocket;version="7.6.2",
org.eclipse.osgi.framework.console;version="1.1.0",
org.osgi.framework;version="1.3.0",
org.osgi.service.http;version="1.2.0",
org.osgi.util.tracker;version="1.3.0"
Export-Package: org.eclipse.jetty.osgi.equinoxtools;x-internal:=true;version="7.4.2",
org.eclipse.jetty.osgi.equinoxtools.console;x-internal:=true;version="7.4.2"
Export-Package: org.eclipse.jetty.osgi.equinoxtools;x-internal:=true;version="7.6.2",
org.eclipse.jetty.osgi.equinoxtools.console;x-internal:=true;version="7.6.2"
Bundle-RequiredExecutionEnvironment: J2SE-1.5

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.osgi</groupId>
<artifactId>jetty-osgi-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -1,16 +1,16 @@
Bundle-ManifestVersion: 2
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-SymbolicName: org.eclipse.jetty.osgi.httpservice
Bundle-Version: 7.4.2.qualifier
Bundle-Version: 7.6.2.qualifier
Bundle-Vendor: Mort Bay Consulting
Bundle-Name: OSGi HttpService provided by equinox HttpServiceServlet deployed on jetty
Jetty-ContextFilePath: contexts/httpservice.xml
Import-Package: javax.servlet;version="2.5.0",
javax.servlet.http;version="2.5.0",
org.eclipse.equinox.http.servlet,
org.eclipse.jetty.server;version="7.0.0",
org.eclipse.jetty.server.handler;version="7.0.0",
org.eclipse.jetty.servlet;version="7.4.0",
org.eclipse.jetty.util.component;version="7.0.0"
Export-Package: org.eclipse.jetty.osgi.httpservice;version="7.4.2"
org.eclipse.jetty.server;version="7.6.2",
org.eclipse.jetty.server.handler;version="7.6.2",
org.eclipse.jetty.servlet;version="7.6.2",
org.eclipse.jetty.util.component;version="7.6.2"
Export-Package: org.eclipse.jetty.osgi.httpservice;version="7.6.2"

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.osgi</groupId>
<artifactId>jetty-osgi-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.eclipse.jetty.osgi</groupId>
@ -15,7 +15,6 @@
<osgi-services-version>3.2.100.v20100503</osgi-services-version>
<equinox-http-servlet-version>1.0.0-v20070606</equinox-http-servlet-version>
<!--equinox-servletbridge-version>1.0.0-v20070523</equinox-servletbridge-version-->
<jsp-2.1-glassfish-version>2.1.v20100127</jsp-2.1-glassfish-version>
<logback-version>0.9.18</logback-version>
<slf4j-version>1.5.11</slf4j-version>
</properties>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.osgi</groupId>
<artifactId>jetty-osgi-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -102,6 +102,12 @@
<artifactId>jetty-websocket</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-plus</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Eclipse OSGi Deps -->
<dependency>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-overlay-deployer</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-plus</artifactId>

View File

@ -13,11 +13,15 @@
package org.eclipse.jetty.plus.jndi;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
import javax.naming.Binding;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.Name;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.RefAddr;
import javax.naming.Reference;
@ -25,6 +29,7 @@ import javax.naming.Referenceable;
import javax.naming.StringRefAddr;
import javax.naming.spi.ObjectFactory;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@ -125,6 +130,35 @@ public class TestNamingEntries
public void init()
{
this.someObject = new SomeObject(4);
}
/**
* after each test we should scrape out any lingering bindings to prevent cross test pollution
* as observed when running java 7
*
* @throws Exception
*/
@After
public void after() throws Exception
{
InitialContext icontext = new InitialContext();
NamingEnumeration<Binding> bindings = icontext.listBindings("");
List<String> names = new ArrayList<String>();
while (bindings.hasMore())
{
Binding bd = (Binding)bindings.next();
names.add(bd.getName());
}
for (String name : names)
{
icontext.unbind(name);
}
}
@Test
@ -199,6 +233,7 @@ public class TestNamingEntries
ne = NamingEntryUtil.lookupNamingEntry(new ScopeB(), "resourceB");
assertNull(ne);
testLink();
}
@Test

View File

@ -3,7 +3,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<artifactId>jetty-policy</artifactId>
<name>Jetty :: Policy Tool</name>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-rewrite</artifactId>

View File

@ -24,12 +24,15 @@ import org.eclipse.jetty.server.Request;
* Rewrite the URI by matching with a regular expression.
* The replacement string may use $n" to replace the nth capture group.
* If the replacement string contains ? character, then it is split into a path
* and query string component. The returned target contains only the path.
* and query string component. The replacement query string may also contain $Q, which
* is replaced with the original query string.
* The returned target contains only the path.
*/
public class RewriteRegexRule extends RegexRule implements Rule.ApplyURI
{
private String _replacement;
private String _query;
private boolean _queryGroup;
/* ------------------------------------------------------------ */
public RewriteRegexRule()
@ -49,6 +52,7 @@ public class RewriteRegexRule extends RegexRule implements Rule.ApplyURI
String[] split=replacement.split("\\?",2);
_replacement = split[0];
_query=split.length==2?split[1]:null;
_queryGroup=_query!=null && _query.contains("$Q");
}
@ -73,7 +77,12 @@ public class RewriteRegexRule extends RegexRule implements Rule.ApplyURI
}
if (query!=null)
{
if (_queryGroup)
query=query.replace("$Q",request.getQueryString()==null?"":request.getQueryString());
request.setAttribute("org.eclipse.jetty.rewrite.handler.RewriteRegexRule.Q",query);
}
return target;
}
@ -84,7 +93,7 @@ public class RewriteRegexRule extends RegexRule implements Rule.ApplyURI
if (_query!=null)
{
String query=(String)request.getAttribute("org.eclipse.jetty.rewrite.handler.RewriteRegexRule.Q");
if (request.getQueryString()==null)
if (_queryGroup||request.getQueryString()==null)
request.setQueryString(query);
else
request.setQueryString(request.getQueryString()+"&"+query);

View File

@ -197,29 +197,26 @@ public class RuleContainer extends Rule
if (applied!=null)
{
LOG.debug("applied {}",rule);
if (!target.equals(applied))
LOG.debug("rewrote {} to {}",target,applied);
if (!original_set)
{
LOG.debug("rewrote {} to {}",target,applied);
if (!original_set)
{
original_set=true;
request.setAttribute(_originalPathAttribute, target);
}
if (_rewriteRequestURI)
{
if (rule instanceof Rule.ApplyURI && !target.equals(request.getRequestURI()))
((Rule.ApplyURI)rule).applyURI((Request)request, target, applied);
else
((Request)request).setRequestURI(applied);
}
if (_rewritePathInfo)
((Request)request).setPathInfo(applied);
target=applied;
original_set=true;
request.setAttribute(_originalPathAttribute, target);
}
if (_rewriteRequestURI)
{
if (rule instanceof Rule.ApplyURI)
((Rule.ApplyURI)rule).applyURI((Request)request, target, applied);
else
((Request)request).setRequestURI(applied);
}
if (_rewritePathInfo)
((Request)request).setPathInfo(applied);
target=applied;
if (rule.isHandling())
{
LOG.debug("handling {}",rule);

View File

@ -23,13 +23,21 @@ public class RewriteRegexRuleTest extends AbstractRuleTestCase
{
private String[][] _tests=
{
{"/foo/bar",".*","/replace","/replace",null},
{"/foo/bar","/xxx.*","/replace",null,null},
{"/foo/bar","/(.*)/(.*)","/$2/$1/xxx","/bar/foo/xxx",null},
{"/foo/bar","/(foo)/(.*)(bar)","/$3/$1/xxx$2","/bar/foo/xxx",null},
{"/foo/$bar",".*","/$replace","/$replace",null},
{"/foo/$bar","/foo/(.*)","/$1/replace","/$bar/replace",null},
{"/foo/bar/info","/foo/(NotHere)?([^/]*)/(.*)","/$3/other?p1=$2","/info/other","p1=bar"},
{"/foo/bar",null,".*","/replace","/replace",null},
{"/foo/bar","n=v",".*","/replace","/replace","n=v"},
{"/foo/bar",null,"/xxx.*","/replace",null,null},
{"/foo/bar",null,"/(.*)/(.*)","/$2/$1/xxx","/bar/foo/xxx",null},
{"/foo/bar",null,"/(.*)/(.*)","/test?p2=$2&p1=$1","/test","p2=bar&p1=foo"},
{"/foo/bar","n=v","/(.*)/(.*)","/test?p2=$2&p1=$1","/test","n=v&p2=bar&p1=foo"},
{"/foo/bar",null,"/(.*)/(.*)","/foo/bar?p2=$2&p1=$1","/foo/bar","p2=bar&p1=foo"},
{"/foo/bar","n=v","/(.*)/(.*)","/foo/bar?p2=$2&p1=$1","/foo/bar","n=v&p2=bar&p1=foo"},
{"/foo/bar",null,"/(foo)/(.*)(bar)","/$3/$1/xxx$2","/bar/foo/xxx",null},
{"/foo/$bar",null,".*","/$replace","/$replace",null},
{"/foo/$bar",null,"/foo/(.*)","/$1/replace","/$bar/replace",null},
{"/foo/bar/info",null,"/foo/(NotHere)?([^/]*)/(.*)","/$3/other?p1=$2","/info/other","p1=bar"},
{"/foo/bar/info",null,"/foo/(NotHere)?([^/]*)/(.*)","/$3/other?p1=$2&$Q","/info/other","p1=bar&"},
{"/foo/bar/info","n=v","/foo/(NotHere)?([^/]*)/(.*)","/$3/other?p1=$2&$Q","/info/other","p1=bar&n=v"},
{"/foo/bar/info","n=v","/foo/(NotHere)?([^/]*)/(.*)","/$3/other?p1=$2","/info/other","n=v&p1=bar"},
};
private RewriteRegexRule _rule;
@ -45,17 +53,43 @@ public class RewriteRegexRuleTest extends AbstractRuleTestCase
{
for (String[] test : _tests)
{
_rule.setRegex(test[1]);
_rule.setReplacement(test[2]);
String result = _rule.matchAndApply(test[0], _request, _response);
assertEquals(test[1], test[3], result);
String t=test[0]+"?"+test[1]+">"+test[2]+"|"+test[3];
_rule.setRegex(test[2]);
_rule.setReplacement(test[3]);
_request.setRequestURI(test[0]);
_request.setQueryString(null);
_request.setQueryString(test[1]);
_request.getAttributes().clearAttributes();
String result = _rule.matchAndApply(test[0], _request, _response);
assertEquals(t, test[4], result);
_rule.applyURI(_request,test[0],result);
assertEquals(test[3], _request.getRequestURI());
assertEquals(test[4], _request.getQueryString());
assertEquals(t,test[4], _request.getRequestURI());
assertEquals(t,test[5], _request.getQueryString());
}
}
@Test
public void testContainedRequestUriEnabled() throws IOException
{
RuleContainer container = new RuleContainer();
container.setRewriteRequestURI(true);
container.addRule(_rule);
for (String[] test : _tests)
{
String t=test[0]+"?"+test[1]+">"+test[2]+"|"+test[3];
_rule.setRegex(test[2]);
_rule.setReplacement(test[3]);
_request.setRequestURI(test[0]);
_request.setQueryString(test[1]);
_request.getAttributes().clearAttributes();
String result = container.apply(test[0],_request,_response);
assertEquals(t,test[4]==null?test[0]:test[4], result);
assertEquals(t,test[4]==null?test[0]:test[4], _request.getRequestURI());
assertEquals(t,test[5], _request.getQueryString());
}
}
}

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-security</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-server</artifactId>

View File

@ -3,7 +3,7 @@
<parent>
<artifactId>jetty-project</artifactId>
<groupId>org.eclipse.jetty</groupId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-servlet</artifactId>

View File

@ -583,7 +583,8 @@ public class ServletHandler extends ScopedHandler
}
finally
{
baseRequest.setHandled(true);
if (servlet_holder!=null)
baseRequest.setHandled(true);
}
}

View File

@ -3,7 +3,7 @@
<parent>
<artifactId>jetty-project</artifactId>
<groupId>org.eclipse.jetty</groupId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-servlets</artifactId>

View File

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.eclipse.jetty.spdy</groupId>
<artifactId>spdy-parent</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.eclipse.jetty.spdy</groupId>
<artifactId>spdy-parent</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spdy-jetty-http-webapp</artifactId>

View File

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.eclipse.jetty.spdy</groupId>
<artifactId>spdy-parent</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spdy-jetty-http</artifactId>

View File

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.eclipse.jetty.spdy</groupId>
<artifactId>spdy-parent</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spdy-jetty</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-start</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-util</artifactId>

View File

@ -232,10 +232,15 @@ public class CertificateValidator
}
// Enable On-Line Certificate Status Protocol (OCSP) support
Security.setProperty("ocsp.enable","true");
if (_enableOCSP)
{
Security.setProperty("ocsp.enable","true");
}
// Enable Certificate Revocation List Distribution Points (CRLDP) support
System.setProperty("com.sun.security.enableCRLDP","true");
if (_enableCRLDP)
{
System.setProperty("com.sun.security.enableCRLDP","true");
}
// Build certification path
CertPathBuilderResult buildResult = CertPathBuilder.getInstance("PKIX").build(pbParams);

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-webapp</artifactId>

View File

@ -3,7 +3,7 @@
<parent>
<artifactId>jetty-project</artifactId>
<groupId>org.eclipse.jetty</groupId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-xml</artifactId>

View File

@ -6,7 +6,7 @@
<version>19</version>
</parent>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
<name>Jetty :: Project</name>
<url>${jetty.url}</url>
<packaging>pom</packaging>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>test-continuation</artifactId>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<artifactId>test-jetty-nested</artifactId>
<name>Jetty :: Nested Test</name>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>test-jetty-servlet</artifactId>

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>test-jetty-webapp</artifactId>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jetty.tests</groupId>
<artifactId>tests-parent</artifactId>

View File

@ -20,7 +20,7 @@
<parent>
<groupId>org.eclipse.jetty.tests</groupId>
<artifactId>tests-parent</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>test-integration</artifactId>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.eclipse.jetty.tests</groupId>
<artifactId>tests-parent</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<artifactId>test-loginservice</artifactId>
<name>Jetty Tests :: Login Service</name>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.eclipse.jetty.tests</groupId>
<artifactId>tests-parent</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<artifactId>test-sessions-parent</artifactId>
<name>Jetty Tests :: Sessions :: Parent</name>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.eclipse.jetty.tests</groupId>
<artifactId>test-sessions-parent</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<artifactId>test-hash-sessions</artifactId>
<name>Jetty Tests :: Sessions :: Hash</name>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.eclipse.jetty.tests</groupId>
<artifactId>test-sessions-parent</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<artifactId>test-jdbc-sessions</artifactId>
<name>Jetty Tests :: Sessions :: JDBC</name>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.eclipse.jetty.tests</groupId>
<artifactId>test-sessions-parent</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<artifactId>test-mongodb-sessions</artifactId>
<name>Jetty Tests :: Sessions :: Mongo</name>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.eclipse.jetty.tests</groupId>
<artifactId>test-sessions-parent</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<artifactId>test-sessions-common</artifactId>
<name>Jetty Tests :: Sessions :: Common</name>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.eclipse.jetty.tests</groupId>
<artifactId>tests-parent</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<artifactId>test-webapps-parent</artifactId>
<name>Jetty Tests :: WebApps :: Parent</name>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.eclipse.jetty.tests</groupId>
<artifactId>test-webapps-parent</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.3-SNAPSHOT</version>
</parent>
<artifactId>test-webapp-rfc2616</artifactId>
<name>Jetty Tests :: WebApp :: RFC2616</name>