Merge branch 'jetty-9.2.x' into cdi-testing

This commit is contained in:
Joakim Erdfelt 2014-10-28 09:36:34 -07:00
commit 607a560ebd
14 changed files with 175 additions and 92 deletions

View File

@ -1,3 +1,75 @@
jetty-9.2.5-SNAPSHOT
jetty-9.2.4.v20141027 - 27 October 2014
+ 376365 "jetty.sh start" returns 0 on failure
+ 396569 'bin/jetty.sh stop' reports 'OK' even when jetty was not running
+ 396572 Starting jetty from cygwin is not working properly
+ 438387 NullPointerException after ServletUpgradeResponse.sendForbidden is
called during WebSocketCreator.createWebSocket
+ 440729 SSL requests often fail with EOFException or IllegalStateException.
+ 442419 CrossOriginFilter javadoc says "exposeHeaders", but should be
"exposedHeaders"
+ 442495 Bad Context ClassLoader in JSR356 WebSocket onOpen
+ 442942 Content sent with status 204 (No Content)
+ 443529 CrossOriginFilter does not accept wildcard for allowedHeaders
+ 443530 CrossOriginFilter does not set the Vary header
+ 444031 Ensure exceptions do not reduce threadpool below minimum
+ 444124 JSP include with <servlet><jsp-file> can cause infinite recursion
+ 444214 Socks4Proxy fails when reading less than 8 bytes.
+ 444222 replace CRLF in header values with whitespace rather than ?
+ 444415 iterative WriteFlusher
+ 444416 AsyncProxyServlet recursion.
+ 444517 Ensure WebSocketUpgradeFilter is always first in filter chain
+ 444547 Format exception in ResourceCache.Content.toString()
+ 444595 nosql/mongodb - Cleanup process/Refreshing does not respect encoding
of attribute keys
+ 444617 Expose local and remote socket address to applications
+ 444676 Goal jetty:deploy-war produces errors with version 9.2.3
+ 444748 WebSocketClient.stop() does not unregister from ShutdownThread
+ 444764 HttpClient notifies callbacks for last chunk of content twice.
+ 444771 JSR356 / EndPointConfig.userProperties are not unique per endpoint
upgrade
+ 444863 ProxyServlet does not filter headers listed by the Connection header.
+ 444896 Overriding of web-default servlet mapping in web.xml not working with
quickstart
+ 445157 First redeployed servlet leaks WebAppContext
+ 445258 STOP.WAIT is not really respected
+ 445374 Reevaluate org.eclipse.jetty.websocket.jsr356 enablement concepts
+ 445495 Improve Exception message when no jndi resource to bind for a name in
web.xml
+ 445542 Add SecuredRedirectHandler for embedded jetty use to redirect to
secure port/scheme
+ 445821 Error 400 should be logged with RequestLog
+ 445823 RequestLogHandler at end of HandlerCollection doesn't work
+ 445830 Support setting environment variables on forked jetty with
jetty:run-forked
+ 445979 jetty.sh fails to start when start-stop-daemon does not exist and the
user is not root
+ 446033 org.eclipse.jetty.websocket.server.WebSocketServerFactory not
available in OSGi
+ 446063 ALPN Fail SSL Handshake if no supported Application Protocols.
+ 446107 NullPointerException in ProxyServlet when extended by Servlet without
a package
+ 446425 Oracle Sql error on JettySessions table when this table do not exist
already
+ 446506 getAsyncContext ISE before startAsync on async dispatches
+ 446563 Null HttpChannel.getCurrentHttpChannel() in
ServletHandler.doFilter().
+ 446672 NPN Specification issue in the case no protocols are selected.
+ 446923 SharedBlockingCallback does not handle connector max idle time of
Long.MAX_VALUE; BlockerTimeoutException not serializable
+ 447381 Disable SSLv3 by default.
+ 447472 test harness for slow large writes
+ 447627 MultiPart file always created when "filename" set in
Content-Disposition
+ 447629 getPart()/getParts() fails on Multipart request if getParameter is
called in a filter first
+ 447746 HttpClient is always going to send User-Agent header even though I do
not want it to.
+ 447979 Refactor to make MetaData responsible for progressively ordering
web-inf jars
+ 448156 Fixed INACTIVE race in IteratingCallback
jetty-9.2.3.v20140905 - 05 September 2014 jetty-9.2.3.v20140905 - 05 September 2014
+ 347110 renamed class transformer methods + 347110 renamed class transformer methods
+ 411163 Add embedded jetty code example with JSP enabled + 411163 Add embedded jetty code example with JSP enabled

View File

@ -105,12 +105,5 @@
<artifactId>jetty-test-helper</artifactId> <artifactId>jetty-test-helper</artifactId>
<!-- scope>test</scope--> <!-- scope>test</scope-->
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -558,22 +558,6 @@
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
<executions> <executions>
<execution>
<id>setup home</id>
<phase>process-classes</phase>
<configuration>
<mainClass>org.eclipse.jetty.start.Main</mainClass>
<arguments>
<argument>jetty.home=${assembly-directory}</argument>
<argument>jetty.base=${assembly-directory}</argument>
<argument>--add-to-start=server,deploy,websocket,ext,resources</argument>
<argument>--add-to-startd=jsp,jstl,http</argument>
</arguments>
</configuration>
<goals>
<goal>java</goal>
</goals>
</execution>
<execution> <execution>
<id>setup demo-base</id> <id>setup demo-base</id>
<phase>process-classes</phase> <phase>process-classes</phase>

View File

@ -1,35 +1,16 @@
#=========================================================== #===========================================================
# Jetty start.jar arguments # Jetty Home Start INI
# #
# The contents of this file, together with the *.ini # It is not recommended to run Jetty from {jetty.home}
# files found in start.d directory are used to build #
# the classpath and command line on a call to # This configuration simply presents a warning message
# java -jar start.jar [arg...] # about this recommendation.
#
# Use the following command to see more options
# java -jar start.jar --help
#
# Each line in these files is prepended to the command line
# as arguments and may be either:
# + A property like: name=value
# + A module to enable like: --module=jmx
# + An XML configuration file like: etc/jetty-feature.xml
# + A start.jar option like: --dry-run
#
# If --exec or --dry-run are used, then this file may also
# contain lines with:
# + A JVM option like: -Xmx2000m
# + A System Property like: -Dcom.sun.management.jmxremote
#
# The --add-to-start=module option can be used to append
# a configuration template for a module to start.ini
# The --add-to-startd=module option can be used to create
# a configuration template for a module in start.d/module.ini
# For example configure and run with SPDY use
#
# java -jar start.jar --add-to-startd=spdy
# $EDITOR start.d/spdy.ini
# java -jar start.jar
# #
# It is considered an advanced features to run Jetty
# from {jetty.home}. If you are brave enough to do this
# then start with a fresh {jetty.home}/start.ini
#=========================================================== #===========================================================
# Show warning message
-Dmain.class=org.eclipse.jetty.start.BaseHomeWarning

View File

@ -105,7 +105,7 @@ import org.eclipse.jetty.util.resource.Resource;
public class ContextHandler extends ScopedHandler implements Attributes, Graceful public class ContextHandler extends ScopedHandler implements Attributes, Graceful
{ {
public final static int SERVLET_MAJOR_VERSION=3; public final static int SERVLET_MAJOR_VERSION=3;
public final static int SERVLET_MINOR_VERSION=0; public final static int SERVLET_MINOR_VERSION=1;
public static final Class<?>[] SERVLET_LISTENER_TYPES = new Class[] {ServletContextListener.class, public static final Class<?>[] SERVLET_LISTENER_TYPES = new Class[] {ServletContextListener.class,
ServletContextAttributeListener.class, ServletContextAttributeListener.class,
ServletRequestListener.class, ServletRequestListener.class,

View File

@ -108,13 +108,6 @@
<version>${project.version}</version> <version>${project.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.toolchain</groupId> <groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-test-helper</artifactId> <artifactId>jetty-test-helper</artifactId>

View File

@ -0,0 +1,34 @@
//
// ========================================================================
// Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//
package org.eclipse.jetty.start;
public class BaseHomeWarning
{
public static void main(String[] args)
{
if(!Main.printTextResource("org/eclipse/jetty/start/base-home-warning.txt"))
{
StartLog.warn("It is not recommended to run Jetty from within {jetty.home}");
StartLog.warn("Use proper {jetty.base} setup");
StartLog.warn("See: http://www.eclipse.org/jetty/documentation/current/startup.html");
}
System.exit(-1);
}
}

View File

@ -741,14 +741,25 @@ public class Main
if (!FS.exists(file)) if (!FS.exists(file))
{ {
/* Startup should NEVER fail to run on missing content. boolean isDir = arg.location.endsWith("/");
* See Bug #427204 if (isDir)
*/
// args.setRun(false);
String type=arg.location.endsWith("/")?"directory":"file";
if (arg.uri!=null)
{ {
StartLog.warn("Required %s '%s' not downloaded from %s. Run with --create-files to download",type,baseHome.toShortForm(file),arg.uri); System.err.println("MKDIR: " + baseHome.toShortForm(file));
FS.ensureDirectoryExists(file);
/* Startup should not fail to run on missing directories.
* See Bug #427204
*/
// args.setRun(false);
}
else
{
StartLog.warn("Missing Required File: %s",baseHome.toShortForm(file));
args.setRun(false);
if (arg.uri != null)
{
StartLog.warn(" Can be downloaded From: %s",arg.uri);
StartLog.warn(" Run start.jar --create-files to download");
}
} }
} }
} }
@ -894,15 +905,26 @@ public class Main
public void usage(boolean exit) public void usage(boolean exit)
{ {
StartLog.endStartLog(); StartLog.endStartLog();
String usageResource = "org/eclipse/jetty/start/usage.txt"; if(!printTextResource("org/eclipse/jetty/start/usage.txt"))
boolean usagePresented = false;
try (InputStream usageStream = getClass().getClassLoader().getResourceAsStream(usageResource))
{ {
if (usageStream != null) System.err.println("ERROR: detailed usage resource unavailable");
}
if (exit)
{
System.exit(EXIT_USAGE);
}
}
public static boolean printTextResource(String resourceName)
{
boolean resourcePrinted = false;
try (InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(resourceName))
{
if (stream != null)
{ {
try (InputStreamReader reader = new InputStreamReader(usageStream); BufferedReader buf = new BufferedReader(reader)) try (InputStreamReader reader = new InputStreamReader(stream); BufferedReader buf = new BufferedReader(reader))
{ {
usagePresented = true; resourcePrinted = true;
String line; String line;
while ((line = buf.readLine()) != null) while ((line = buf.readLine()) != null)
{ {
@ -912,21 +934,15 @@ public class Main
} }
else else
{ {
System.out.println("No usage.txt ??"); System.out.println("Unable to find resource: " + resourceName);
} }
} }
catch (IOException e) catch (IOException e)
{ {
StartLog.warn(e); StartLog.warn(e);
} }
if (!usagePresented)
{ return resourcePrinted;
System.err.println("ERROR: detailed usage resource unavailable");
}
if (exit)
{
System.exit(EXIT_USAGE);
}
} }
// ------------------------------------------------------------ // ------------------------------------------------------------

View File

@ -574,7 +574,7 @@ public class StartArgs
for (String key : systemPropertyKeys) for (String key : systemPropertyKeys)
{ {
// ignored keys // ignored keys
if ("jetty.home".equals(key) || "jetty.base".equals(key)) if ("jetty.home".equals(key) || "jetty.base".equals(key) || "main.class".equals(key))
{ {
// skip // skip
continue; continue;

View File

@ -0,0 +1,15 @@
WARNING
-------
While it is possible to run Jetty from within {jetty.home},
it is not recommended that you run Jetty this way.
Please setup a proper {jetty.base}.
See http://www.eclipse.org/jetty/documentation/current/startup.html
The demo-base has been provided to you for an example of this kind of setup.
$ cd demo-base
$ java -jar ../start.jar

View File

@ -20,7 +20,6 @@ package org.eclipse.jetty.websocket.server;
import java.io.IOException; import java.io.IOException;
import java.util.EnumSet; import java.util.EnumSet;
import javax.servlet.DispatcherType; import javax.servlet.DispatcherType;
import javax.servlet.Filter; import javax.servlet.Filter;
import javax.servlet.FilterChain; import javax.servlet.FilterChain;
@ -77,6 +76,7 @@ public class WebSocketUpgradeFilter extends ContainerLifeCycle implements Filter
FilterHolder fholder = new FilterHolder(filter); FilterHolder fholder = new FilterHolder(filter);
fholder.setName(name); fholder.setName(name);
fholder.setAsyncSupported(true);
fholder.setInitParameter(CONTEXT_ATTRIBUTE_KEY,WebSocketUpgradeFilter.class.getName()); fholder.setInitParameter(CONTEXT_ATTRIBUTE_KEY,WebSocketUpgradeFilter.class.getName());
context.addFilter(fholder,pathSpec,dispatcherTypes); context.addFilter(fholder,pathSpec,dispatcherTypes);
@ -108,6 +108,7 @@ public class WebSocketUpgradeFilter extends ContainerLifeCycle implements Filter
String urlPatterns[] = { pathSpec }; String urlPatterns[] = { pathSpec };
FilterRegistration.Dynamic dyn = context.addFilter(name,filter); FilterRegistration.Dynamic dyn = context.addFilter(name,filter);
dyn.setAsyncSupported(true);
dyn.setInitParameter(CONTEXT_ATTRIBUTE_KEY,WebSocketUpgradeFilter.class.getName()); dyn.setInitParameter(CONTEXT_ATTRIBUTE_KEY,WebSocketUpgradeFilter.class.getName());
dyn.addMappingForUrlPatterns(dispatcherTypes,isMatchAfter,urlPatterns); dyn.addMappingForUrlPatterns(dispatcherTypes,isMatchAfter,urlPatterns);

View File

@ -26,6 +26,7 @@
<connection>scm:git:http://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project.git</connection> <connection>scm:git:http://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project.git</connection>
<developerConnection>scm:git:ssh://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project.git</developerConnection> <developerConnection>scm:git:ssh://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project.git</developerConnection>
<url>http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree</url> <url>http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree</url>
<tag>HEAD</tag>
</scm> </scm>
<build> <build>
<defaultGoal>install</defaultGoal> <defaultGoal>install</defaultGoal>

View File

@ -116,13 +116,6 @@
<version>${project.version}</version> <version>${project.version}</version>
<type>pom</type> <type>pom</type>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.toolchain</groupId> <groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-test-helper</artifactId> <artifactId>jetty-test-helper</artifactId>