Merge remote-tracking branch 'origin/jetty-9.2.x'

Conflicts:
	VERSION.txt
	aggregates/jetty-all/pom.xml
	apache-jsp/pom.xml
	apache-jstl/pom.xml
	examples/async-rest/async-rest-jar/pom.xml
	examples/async-rest/async-rest-webapp/pom.xml
	examples/async-rest/pom.xml
	examples/embedded/pom.xml
	examples/pom.xml
	jetty-alpn/jetty-alpn-client/pom.xml
	jetty-alpn/jetty-alpn-server/pom.xml
	jetty-alpn/pom.xml
	jetty-annotations/pom.xml
	jetty-ant/pom.xml
	jetty-cdi/pom.xml
	jetty-client/pom.xml
	jetty-continuation/pom.xml
	jetty-deploy/pom.xml
	jetty-distribution/pom.xml
	jetty-fcgi/fcgi-client/pom.xml
	jetty-fcgi/fcgi-server/pom.xml
	jetty-fcgi/pom.xml
	jetty-http-spi/pom.xml
	jetty-http/pom.xml
	jetty-io/pom.xml
	jetty-jaas/pom.xml
	jetty-jaspi/pom.xml
	jetty-jmx/pom.xml
	jetty-jndi/pom.xml
	jetty-jsp/pom.xml
	jetty-jspc-maven-plugin/pom.xml
	jetty-maven-plugin/pom.xml
	jetty-monitor/pom.xml
	jetty-nosql/pom.xml
	jetty-osgi/jetty-osgi-alpn/pom.xml
	jetty-osgi/jetty-osgi-boot-jsp/pom.xml
	jetty-osgi/jetty-osgi-boot-warurl/pom.xml
	jetty-osgi/jetty-osgi-boot/pom.xml
	jetty-osgi/jetty-osgi-httpservice/pom.xml
	jetty-osgi/jetty-osgi-npn/pom.xml
	jetty-osgi/pom.xml
	jetty-osgi/test-jetty-osgi-context/pom.xml
	jetty-osgi/test-jetty-osgi-webapp/pom.xml
	jetty-osgi/test-jetty-osgi/pom.xml
	jetty-plus/pom.xml
	jetty-proxy/pom.xml
	jetty-quickstart/pom.xml
	jetty-rewrite/pom.xml
	jetty-runner/pom.xml
	jetty-security/pom.xml
	jetty-server/pom.xml
	jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java
	jetty-servlet/pom.xml
	jetty-servlets/pom.xml
	jetty-spdy/pom.xml
	jetty-spdy/spdy-alpn-tests/pom.xml
	jetty-spdy/spdy-client/pom.xml
	jetty-spdy/spdy-core/pom.xml
	jetty-spdy/spdy-example-webapp/pom.xml
	jetty-spdy/spdy-http-client-transport/pom.xml
	jetty-spdy/spdy-http-common/pom.xml
	jetty-spdy/spdy-http-server/pom.xml
	jetty-spdy/spdy-npn-tests/pom.xml
	jetty-spdy/spdy-server/pom.xml
	jetty-spring/pom.xml
	jetty-start/pom.xml
	jetty-util-ajax/pom.xml
	jetty-util/pom.xml
	jetty-webapp/pom.xml
	jetty-websocket/javax-websocket-client-impl/pom.xml
	jetty-websocket/javax-websocket-server-impl/pom.xml
	jetty-websocket/pom.xml
	jetty-websocket/websocket-api/pom.xml
	jetty-websocket/websocket-client/pom.xml
	jetty-websocket/websocket-common/pom.xml
	jetty-websocket/websocket-server/pom.xml
	jetty-websocket/websocket-servlet/pom.xml
	jetty-xml/pom.xml
	pom.xml
	tests/pom.xml
	tests/test-continuation/pom.xml
	tests/test-integration/pom.xml
	tests/test-loginservice/pom.xml
	tests/test-quickstart/pom.xml
	tests/test-sessions/pom.xml
	tests/test-sessions/test-hash-sessions/pom.xml
	tests/test-sessions/test-jdbc-sessions/pom.xml
	tests/test-sessions/test-mongodb-sessions/pom.xml
	tests/test-sessions/test-sessions-common/pom.xml
	tests/test-webapps/pom.xml
	tests/test-webapps/test-jaas-webapp/pom.xml
	tests/test-webapps/test-jetty-webapp/pom.xml
	tests/test-webapps/test-jndi-webapp/pom.xml
	tests/test-webapps/test-mock-resources/pom.xml
	tests/test-webapps/test-proxy-webapp/pom.xml
	tests/test-webapps/test-servlet-spec/pom.xml
	tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml
	tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml
	tests/test-webapps/test-servlet-spec/test-web-fragment/pom.xml
	tests/test-webapps/test-webapp-rfc2616/pom.xml
This commit is contained in:
Greg Wilkins 2014-11-19 13:37:48 +11:00
commit aeccef2154
10 changed files with 67 additions and 10 deletions

View File

@ -1,5 +1,16 @@
jetty-9.3.0-SNAPSHOT
jetty-9.2.5.v20141112 - 12 November 2014
+ 448446 org.eclipse.jetty.start.Main create classloader duplicate
+ 449594 Handle ArrayTrie overflow with false return
+ 449811 handle unquoted etags when gzipping
+ 450467 Integer overflow in Session expiry calculation in MongoSessionManager
+ 450483 Missing parameterization of etc/jetty-deploy.xml.
+ 450484 Missing parameterization of etc/jetty-http[s].xml.
+ 450855 GzipFilter MIGHT_COMPRESS exception
+ 450873 Disable tests that downcaste wrapped GzipFilterResponses
+ 450894 jetty.sh does not delete JETTY_STATE at start
jetty-9.2.4.v20141103 - 03 November 2014
+ 376365 "jetty.sh start" returns 0 on failure
+ 396569 'bin/jetty.sh stop' reports 'OK' even when jetty was not running

View File

@ -30,6 +30,7 @@ import java.util.concurrent.ConcurrentHashMap;
import org.eclipse.jetty.annotations.ClassNameResolver;
import org.eclipse.jetty.osgi.boot.utils.BundleFileLocatorHelper;
import org.eclipse.jetty.osgi.boot.utils.BundleFileLocatorHelperFactory;
import org.eclipse.jetty.util.ConcurrentHashSet;
import org.eclipse.jetty.util.resource.Resource;
import org.osgi.framework.Bundle;
@ -56,7 +57,7 @@ public class AnnotationParser extends org.eclipse.jetty.annotations.AnnotationPa
*/
protected Resource indexBundle(Bundle bundle) throws Exception
{
File bundleFile = BundleFileLocatorHelper.DEFAULT.getBundleInstallLocation(bundle);
File bundleFile = BundleFileLocatorHelperFactory.getFactory().getHelper().getBundleInstallLocation(bundle);
Resource resource = Resource.newResource(bundleFile.toURI());
URI uri = resource.getURI();
_uriToBundle.putIfAbsent(uri,bundle);

View File

@ -14,10 +14,9 @@
<bundle-symbolic-name>${project.groupId}.boot.test.spdy</bundle-symbolic-name>
<jetty-orbit-url>http://download.eclipse.org/jetty/orbit/</jetty-orbit-url>
<assembly-directory>target/distribution</assembly-directory>
<exam.version>3.4.0</exam.version>
<exam.version>3.5.0</exam.version>
<url.version>1.5.2</url.version>
<injection.bundle.version>1.0</injection.bundle.version>
<runner.version>1.8.5</runner.version>
</properties>
<dependencies>
<!-- Pax Exam Dependencies -->
@ -87,7 +86,7 @@
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>osgi</artifactId>
<version>3.9.1-v20140110-1610</version>
<version>3.10.0-v20140606-1445</version>
<scope>test</scope>
</dependency>
<dependency>

View File

@ -30,6 +30,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
@ -43,6 +44,7 @@ import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.api.Response;
import org.eclipse.jetty.client.util.BytesContentProvider;
import org.eclipse.jetty.client.util.DeferredContentProvider;
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.servlet.ServletContextHandler;
@ -102,6 +104,7 @@ public class ProxyServletFailureTest
proxy = new Server(executor);
proxyConnector = new ServerConnector(proxy);
proxy.addConnector(proxyConnector);
proxyConnector.getConnectionFactory(HttpConnectionFactory.class).getHttpConfiguration().setDelayDispatchOnContent(false);
ServletContextHandler proxyCtx = new ServletContextHandler(proxy, "/", true, false);
ServletHolder proxyServletHolder = new ServletHolder(proxyServlet);

View File

@ -85,6 +85,7 @@
<Set name="sendServerVersion"><Property name="jetty.send.server.version" default="true" /></Set>
<Set name="sendDateHeader"><Property name="jetty.send.date.header" default="false" /></Set>
<Set name="headerCacheSize">512</Set>
<Set name="delayDispatchOnContent"><Property name="jetty.delayDispatchOnContent" default="false"/></Set>
<!-- Uncomment to enable handling of X-Forwarded- style headers
<Call name="addCustomizer">
<Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg>

View File

@ -45,5 +45,5 @@ jetty.send.date.header=false
jetty.dump.start=false
# Dump the state of the Jetty server, before stop
jetty.dump.stop=false
# Enable delayed dispatch optimisation
jetty.delayDispatchOnContent=false

View File

@ -295,6 +295,12 @@ class HttpChannelOverHttp extends HttpChannel implements HttpParser.RequestHandl
_httpConnection._generator.setPersistent(false);
onRequest(_metadata);
// Should we delay dispatch until we have some content?
// We should not delay if there is no content expect or client is expecting 100 or the response is already committed or the request buffer already has something in it to parse
if (getHttpConfiguration().isDelayDispatchOnContent() && _httpConnection.getParser().getContentLength()>0 && !isExpecting100Continue() && !isCommitted() && _httpConnection.isRequestBufferEmpty())
return false;
return true;
}

View File

@ -53,6 +53,7 @@ public class HttpConfiguration
private boolean _sendServerVersion = true; //send Server: header
private boolean _sendXPoweredBy = false; //send X-Powered-By: header
private boolean _sendDateHeader = true; //send Date: header
private boolean _delayDispatchOnContent = false; // Don't dispatch until content arrives
/* ------------------------------------------------------------ */
@ -130,75 +131,104 @@ public class HttpConfiguration
return null;
}
/* ------------------------------------------------------------ */
@ManagedAttribute("The size in bytes of the output buffer used to aggregate HTTP output")
public int getOutputBufferSize()
{
return _outputBufferSize;
}
/* ------------------------------------------------------------ */
@ManagedAttribute("The maximum allowed size in bytes for a HTTP request header")
public int getRequestHeaderSize()
{
return _requestHeaderSize;
}
/* ------------------------------------------------------------ */
@ManagedAttribute("The maximum allowed size in bytes for a HTTP response header")
public int getResponseHeaderSize()
{
return _responseHeaderSize;
}
/* ------------------------------------------------------------ */
@ManagedAttribute("The maximum allowed size in bytes for a HTTP header field cache")
public int getHeaderCacheSize()
{
return _headerCacheSize;
}
/* ------------------------------------------------------------ */
@ManagedAttribute("The port to which Integral or Confidential security constraints are redirected")
public int getSecurePort()
{
return _securePort;
}
/* ------------------------------------------------------------ */
@ManagedAttribute("The scheme with which Integral or Confidential security constraints are redirected")
public String getSecureScheme()
{
return _secureScheme;
}
/* ------------------------------------------------------------ */
public void setSendServerVersion (boolean sendServerVersion)
{
_sendServerVersion = sendServerVersion;
}
/* ------------------------------------------------------------ */
@ManagedAttribute("if true, send the Server header in responses")
public boolean getSendServerVersion()
{
return _sendServerVersion;
}
/* ------------------------------------------------------------ */
public void setSendXPoweredBy (boolean sendXPoweredBy)
{
_sendXPoweredBy=sendXPoweredBy;
}
/* ------------------------------------------------------------ */
@ManagedAttribute("if true, send the X-Powered-By header in responses")
public boolean getSendXPoweredBy()
{
return _sendXPoweredBy;
}
/* ------------------------------------------------------------ */
public void setSendDateHeader(boolean sendDateHeader)
{
_sendDateHeader = sendDateHeader;
}
/* ------------------------------------------------------------ */
@ManagedAttribute("if true, include the date in HTTP headers")
public boolean getSendDateHeader()
{
return _sendDateHeader;
}
/* ------------------------------------------------------------ */
/**
* @param delay if true, delay the application dispatch until content is available
*/
public void setDelayDispatchOnContent(boolean delay)
{
_delayDispatchOnContent=delay;
}
/* ------------------------------------------------------------ */
@ManagedAttribute("if true, delay the application dispatch until content is available")
public boolean isDelayDispatchOnContent()
{
return _delayDispatchOnContent;
}
/* ------------------------------------------------------------ */
/**
* <p>Set the {@link Customizer}s that are invoked for every

View File

@ -175,6 +175,11 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
return _requestBuffer;
}
public boolean isRequestBufferEmpty()
{
return BufferUtil.isEmpty(_requestBuffer);
}
/**
* <p>Parses and handles HTTP messages.</p>
* <p>This method is called when this {@link Connection} is ready to read bytes from the {@link EndPoint}.

View File

@ -1278,6 +1278,7 @@ public abstract class HttpServerTestBase extends HttpServerTestFixture
{
AvailableHandler ah = new AvailableHandler();
configureServer(ah);
_connector.getConnectionFactory(HttpConnectionFactory.class).getHttpConfiguration().setDelayDispatchOnContent(false);
try (Socket client = newSocket(_serverURI.getHost(), _serverURI.getPort()))
{