diff --git a/VERSION.txt b/VERSION.txt index bf6e9fcf095..a6c48bbedcc 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -39,6 +39,74 @@ jetty-9.0.0.v20130308 - 08 March 2013 + 402757 WebSocket client module can't be used with WebSocket server module in the same WAR +jetty-8.1.10.v20130312 - 12 March 2013 + + 376273 Early EOF because of SSL Protocol Error on + https://api-3t.paypal.com/nvp. + + 381521 allow compress methods to be configured + + 392129 fixed handling of timeouts after startAsync + + 394064 ensure that JarFile instances are closed on JarFileResource.release() + + 398649 ServletContextListener.contextDestroyed() is not called on + ContextHandler unregistration + + 399703 made encoding error handling consistent + + 399799 do not hold lock while calling invalidation listeners + + 399967 Shutdown hook calls destroy + + 400040 NullPointerException in HttpGenerator.prepareBuffers + + 400142 ConcurrentModificationException in JDBC SessionManger + + 400144 When loading a session fails the JDBCSessionManger produces duplicate + session IDs + + 400312 ServletContextListener.contextInitialized() is not called when added + in ServletContainerInitializer.onStartup + + 400457 Thread context classloader hierarchy not searched when finding + webapp's java:comp/env + + 400859 limit max size of writes from cached content + + 401211 Remove requirement for jetty-websocket.jar in WEB-INF/lib + + 401317 Make Safari 5.x websocket support minVersion level error more clear + + 401382 Prevent parseAvailable from parsing next chunk when previous has not + been consumed. Handle no content-type in chunked request. + + 401474 Performance problem in org.eclipse.jetty.annotation.AnnotationParser + + 401485 zip file closed exception + + 401531 StringIndexOutOfBoundsException for "/*" of + fix for multiple mappings to *.jsp + + 401908 Enhance DosFilter to allow dynamic configuration of attributes. + + 402048 org.eclipse.jetty.server.ShutdownMonitor doesn't stop after the jetty + server is stopped + + 402485 reseed secure random + + 402735 jetty.sh to support status which is == check + + 402833 Test harness for global error page and hide exception message from + reason string + +jetty-7.6.10.v20130312 - 12 March 2013 + + 376273 Early EOF because of SSL Protocol Error on + https://api-3t.paypal.com/nvp. + + 381521 allow compress methods to be configured + + 394064 ensure that JarFile instances are closed on JarFileResource.release() + + 398649 ServletContextListener.contextDestroyed() is not called on + ContextHandler unregistration + + 399703 made encoding error handling consistent + + 399799 do not hold lock while calling invalidation listeners + + 399967 Shutdown hook calls destroy + + 400040 NullPointerException in HttpGenerator.prepareBuffers + + 400142 ConcurrentModificationException in JDBC SessionManger + + 400144 When loading a session fails the JDBCSessionManger produces duplicate + session IDs + + 400457 Thread context classloader hierarchy not searched when finding + webapp's java:comp/env + + 400859 limit max size of writes from cached content + + 401211 Remove requirement for jetty-websocket.jar in WEB-INF/lib + + 401317 Make Safari 5.x websocket support minVersion level error more clear + + 401382 Prevent parseAvailable from parsing next chunk when previous has not + been consumed. Handle no content-type in chunked request. + + 401474 Performance problem in org.eclipse.jetty.annotation.AnnotationParser + + 401531 StringIndexOutOfBoundsException for "/*" of + fix for multiple mappings to *.jsp + + 401908 Enhance DosFilter to allow dynamic configuration of attributes. + + 402048 org.eclipse.jetty.server.ShutdownMonitor doesn't stop after the jetty + server is stopped + + 402485 reseed secure random + + 402735 jetty.sh to support status which is == check + + 402833 Test harness for global error page and hide exception message from + reason string + jetty-9.0.0.RC2 - 24 February 2013 + Fix etc/jetty.xml TimerScheduler typo that is preventing normal startup + Fix etc/jetty-https.xml ExcludeCipherSuites typo that prevents SSL startup diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/HostnameVerificationTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/HostnameVerificationTest.java index 7fe669c4235..d97093c3b70 100644 --- a/jetty-client/src/test/java/org/eclipse/jetty/client/HostnameVerificationTest.java +++ b/jetty-client/src/test/java/org/eclipse/jetty/client/HostnameVerificationTest.java @@ -62,6 +62,7 @@ public class HostnameVerificationTest sslContextFactory.setKeyStorePath("src/test/resources/keystore.jks"); sslContextFactory.setKeyStorePassword("storepwd"); } + sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS"); if (server == null) server = new Server(); diff --git a/jetty-distribution/src/main/resources/bin/jetty.sh b/jetty-distribution/src/main/resources/bin/jetty.sh index 24a573c77b6..17ba7055368 100755 --- a/jetty-distribution/src/main/resources/bin/jetty.sh +++ b/jetty-distribution/src/main/resources/bin/jetty.sh @@ -106,10 +106,28 @@ findDirectory() running() { - local PID=$(cat "$1" 2>/dev/null) || return 1 + local PID=$(head -n 1 "$1" 2>/dev/null) || return 1 kill -0 "$PID" 2>/dev/null } +started() +{ + # wait for 60s to see "STARTED" in PID file, needs jetty-started.xml as argument + for T in 1 2 3 4 5 6 7 9 10 11 12 13 14 15 + do + sleep 4 + [ -z "$(grep STARTED $1)" ] || return 0 + [ -z "$(grep STOPPED $1)" ] || return 1 + [ -z "$(grep FAILED $1)" ] || return 1 + local PID=$(head -n 1 "$1" 2>/dev/null) || return 1 + kill -0 "$PID" 2>/dev/null || return 1 + echo -n ". " + done + + return 1; +} + + readConfig() { (( DEBUG )) && echo "Reading $1.." @@ -137,7 +155,13 @@ shift ################################################## # Read any configuration files ################################################## -for CONFIG in /etc/default/jetty{,9} $HOME/.jettyrc; do +ETC=/etc +if [ $UID != 0 ] +then + ETC=$HOME/etc +fi + +for CONFIG in $ETC/default/jetty{,9} $HOME/.jettyrc; do if [ -f "$CONFIG" ] ; then readConfig "$CONFIG" fi @@ -262,9 +286,9 @@ fi ################################################## if [ -z "$JETTY_CONF" ] then - if [ -f /etc/jetty.conf ] + if [ -f $ETC/jetty.conf ] then - JETTY_CONF=/etc/jetty.conf + JETTY_CONF=$ETC/jetty.conf elif [ -f "$JETTY_HOME/etc/jetty.conf" ] then JETTY_CONF=$JETTY_HOME/etc/jetty.conf @@ -318,6 +342,7 @@ if [ -z "$JETTY_PID" ] then JETTY_PID="$JETTY_RUN/jetty.pid" fi +JAVA_OPTIONS+=("-Djetty.pid=$JETTY_PID") ################################################## # Setup JAVA if unset @@ -407,23 +432,15 @@ case "$ACTION" in exit fi - if type start-stop-daemon > /dev/null 2>&1 + if [ $UID -eq 0 ] && type start-stop-daemon > /dev/null 2>&1 then unset CH_USER if [ -n "$JETTY_USER" ] then CH_USER="-c$JETTY_USER" fi - if start-stop-daemon -S -p"$JETTY_PID" $CH_USER -d"$JETTY_HOME" -b -m -a "$JAVA" -- "${RUN_ARGS[@]}" --daemon - then - sleep 1 - if running "$JETTY_PID" - then - echo "OK" - else - echo "FAILED" - fi - fi + + start-stop-daemon -S -p"$JETTY_PID" $CH_USER -d"$JETTY_HOME" -b -m -a "$JAVA" -- "${RUN_ARGS[@]}" --daemon else @@ -454,14 +471,20 @@ case "$ACTION" in echo $! > "$JETTY_PID" fi - echo "STARTED Jetty `date`" + fi + + if started "$JETTY_PID" + then + echo "OK `date`" + else + echo "FAILED `date`" fi ;; stop) echo -n "Stopping Jetty: " - if type start-stop-daemon > /dev/null 2>&1; then + if [ $UID -eq 0 ] && type start-stop-daemon > /dev/null 2>&1; then start-stop-daemon -K -p"$JETTY_PID" -d"$JETTY_HOME" -a "$JAVA" -s HUP TIMEOUT=30 @@ -476,7 +499,7 @@ case "$ACTION" in rm -f "$JETTY_PID" echo OK else - PID=$(cat "$JETTY_PID" 2>/dev/null) + PID=$(head -n 1 "$JETTY_PID" 2>/dev/null) kill "$PID" 2>/dev/null TIMEOUT=30 diff --git a/jetty-distribution/src/main/resources/etc/jetty-started.xml b/jetty-distribution/src/main/resources/etc/jetty-started.xml new file mode 100644 index 00000000000..15d4db3c5bb --- /dev/null +++ b/jetty-distribution/src/main/resources/etc/jetty-started.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/jetty-distribution/src/main/resources/etc/jetty.conf b/jetty-distribution/src/main/resources/etc/jetty.conf index b79f3169fb9..2e2e1aa8459 100644 --- a/jetty-distribution/src/main/resources/etc/jetty.conf +++ b/jetty-distribution/src/main/resources/etc/jetty.conf @@ -6,8 +6,7 @@ # created by that script. # # Each line in this file becomes an arguement to start.jar -# unless this file contains an --ini option, then these -# arguments will be in addition to those found in the -# start.ini file +# in addition to those found in the start.ini file # ======================================================= ---pre=etc/jetty-logging.xml +etc/jetty-logging.xml +etc/jetty-started.xml diff --git a/jetty-osgi/test-jetty-osgi/pom.xml b/jetty-osgi/test-jetty-osgi/pom.xml index b9647e07573..b8822babf8e 100644 --- a/jetty-osgi/test-jetty-osgi/pom.xml +++ b/jetty-osgi/test-jetty-osgi/pom.xml @@ -19,7 +19,7 @@ 4.0.3 1.0 1.7.6 - 1.1.2.v20130305 + 1.1.5.v20130313 diff --git a/jetty-server/src/main/config/etc/jetty-https.xml b/jetty-server/src/main/config/etc/jetty-https.xml index fe3f1952f87..93c8fe1954d 100644 --- a/jetty-server/src/main/config/etc/jetty-https.xml +++ b/jetty-server/src/main/config/etc/jetty-https.xml @@ -17,6 +17,14 @@ + + + + + + + + /etc/keystore @@ -24,6 +32,7 @@ OBF:1u2u1wml1z7s1z7a1wnl1u2g /etc/keystore OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4 + SSL_RSA_WITH_DES_CBC_SHA diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterHolder.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterHolder.java index 3f41d532715..e69910480a7 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterHolder.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterHolder.java @@ -97,7 +97,19 @@ public class FilterHolder extends Holder super.stop(); throw new IllegalStateException(msg); } + } + + + + + + /* ------------------------------------------------------------ */ + @Override + public void initialize() throws Exception + { + super.initialize(); + if (_filter==null) { try @@ -123,6 +135,7 @@ public class FilterHolder extends Holder _filter.init(_config); } + /* ------------------------------------------------------------ */ @Override public void doStop() diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Holder.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Holder.java index f67b635bf17..0b7a1fb8f0e 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Holder.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Holder.java @@ -82,6 +82,19 @@ public class Holder extends AbstractLifeCycle implements Dumpable { return _extInstance; } + + + /* ------------------------------------------------------------ */ + /** + * Do any setup necessary after starting + * @throws Exception + */ + public void initialize() + throws Exception + { + if (!isStarted()) + throw new IllegalStateException("Not started: "+this); + } /* ------------------------------------------------------------ */ @SuppressWarnings("unchecked") diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java index a413cab28b1..9baefac40ab 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java @@ -741,6 +741,7 @@ public class ServletHandler extends ScopedHandler try { h.start(); + h.initialize(); } catch (Exception e) { diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java index 8ff369ef0ec..6de3b7e48bf 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java @@ -280,7 +280,7 @@ public class ServletHolder extends Holder implements UserIdentity.Scope _enabled = enabled; } - + /* ------------------------------------------------------------ */ public void doStart() throws Exception @@ -319,7 +319,17 @@ public class ServletHolder extends Holder implements UserIdentity.Scope if (_class!=null && javax.servlet.SingleThreadModel.class.isAssignableFrom(_class)) _servlet = new SingleThreadedWrapper(); - + + } + + + /* ------------------------------------------------------------ */ + @Override + public void initialize () + throws Exception + { + super.initialize(); + if (_extInstance || _initOnStartup) { try @@ -335,7 +345,8 @@ public class ServletHolder extends Holder implements UserIdentity.Scope } } } - + + /* ------------------------------------------------------------ */ public void doStop() throws Exception diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/AbstractDoSFilterTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/AbstractDoSFilterTest.java index 044c6660ae9..b81a1e44de4 100644 --- a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/AbstractDoSFilterTest.java +++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/AbstractDoSFilterTest.java @@ -98,7 +98,9 @@ public abstract class AbstractDoSFilterTest public void startFilters() throws Exception { _dosFilter.start(); + _dosFilter.initialize(); _timeoutFilter.start(); + _timeoutFilter.initialize(); } @After diff --git a/jetty-spdy/spdy-http-server/src/main/config/etc/jetty-spdy.xml b/jetty-spdy/spdy-http-server/src/main/config/etc/jetty-spdy.xml index e6361a873ab..277f22e6095 100644 --- a/jetty-spdy/spdy-http-server/src/main/config/etc/jetty-spdy.xml +++ b/jetty-spdy/spdy-http-server/src/main/config/etc/jetty-spdy.xml @@ -24,6 +24,18 @@ OBF:1u2u1wml1z7s1z7a1wnl1u2g /etc/keystore OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4 + + + + SSL_RSA_WITH_DES_CBC_SHA + SSL_DHE_RSA_WITH_DES_CBC_SHA + SSL_DHE_DSS_WITH_DES_CBC_SHA + SSL_RSA_EXPORT_WITH_RC4_40_MD5 + SSL_RSA_EXPORT_WITH_DES40_CBC_SHA + SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA + SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA + + diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/component/FileNoticeLifeCycleListener.java b/jetty-util/src/main/java/org/eclipse/jetty/util/component/FileNoticeLifeCycleListener.java new file mode 100644 index 00000000000..8d3f7cf1d16 --- /dev/null +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/component/FileNoticeLifeCycleListener.java @@ -0,0 +1,85 @@ +// +// ======================================================================== +// Copyright (c) 1995-2013 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.util.component; + +import java.io.FileWriter; + +import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; + + +/* ------------------------------------------------------------ */ +/** A LifeCycle Listener that writes state changes to a file. + *

This can be used with the jetty.sh script to wait for successful startup. + */ +public class FileNoticeLifeCycleListener implements LifeCycle.Listener +{ + Logger LOG = Log.getLogger(FileNoticeLifeCycleListener.class); + + private final String _filename; + + public FileNoticeLifeCycleListener(String filename) + { + _filename=filename; + } + + private void writeState(String action, LifeCycle lifecycle) + { + try + { + FileWriter out = new FileWriter(_filename,true); + out.append(action).append(" ").append(lifecycle.toString()).append("\n"); + out.close(); + } + catch(Exception e) + { + LOG.warn(e); + } + } + + @Override + public void lifeCycleStarting(LifeCycle event) + { + writeState("STARTING",event); + } + + @Override + public void lifeCycleStarted(LifeCycle event) + { + writeState("STARTED",event); + } + + @Override + public void lifeCycleFailure(LifeCycle event, Throwable cause) + { + writeState("FAILED",event); + } + + @Override + public void lifeCycleStopping(LifeCycle event) + { + writeState("STOPPING",event); + } + + @Override + public void lifeCycleStopped(LifeCycle event) + { + writeState("STOPPED",event); + } +} diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/SslContextFactory.java b/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/SslContextFactory.java index da043b5c584..857d199a818 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/SslContextFactory.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/SslContextFactory.java @@ -194,7 +194,7 @@ public class SslContextFactory extends AbstractLifeCycle private SSLContext _context; /** EndpointIdentificationAlgorithm - when set to "HTTPS" hostname verification will be enabled */ - private String _endpointIdentificationAlgorithm = "HTTPS"; + private String _endpointIdentificationAlgorithm = null; private boolean _trustAll; diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java index 2f8a00588f7..8f5310a6f1c 100644 --- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java +++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java @@ -490,7 +490,7 @@ public abstract class AbstractWebSocketConnection extends AbstractConnection imp @Override protected boolean onReadTimeout() { - LOG.warn("Read Timeout"); + LOG.info("Read Timeout"); IOState state = getIOState(); if ((state.getState() == ConnectionState.CLOSING) || (state.getState() == ConnectionState.CLOSED))