diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConfiguration.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConfiguration.java index 87f62c2b96d..352af25c750 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConfiguration.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConfiguration.java @@ -52,7 +52,7 @@ public class HttpConfiguration private String _secureScheme = HttpScheme.HTTPS.asString(); private boolean _sendServerVersion = true; //send Server: header private boolean _sendXPoweredBy = false; //send X-Powered-By: header - private boolean _sendDateHeader = false; //send Date: header + private boolean _sendDateHeader = true; //send Date: header public interface Customizer { diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/AsyncRequestReadTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/AsyncRequestReadTest.java index c8a43211f1b..2c9fd571a4e 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/AsyncRequestReadTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/AsyncRequestReadTest.java @@ -59,6 +59,7 @@ public class AsyncRequestReadTest server = new Server(); connector = new ServerConnector(server); connector.setIdleTimeout(10000); + connector.getConnectionFactory(HttpConnectionFactory.class).getHttpConfiguration().setSendDateHeader(false); server.addConnector(connector); } diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestFixture.java b/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestFixture.java index 1636cd4ab8d..abce05f7b45 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestFixture.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestFixture.java @@ -68,6 +68,7 @@ public class HttpServerTestFixture protected void startServer(ServerConnector connector) throws Exception { _connector = connector; + _connector.getConnectionFactory(HttpConnectionFactory.class).getHttpConfiguration().setSendDateHeader(false); _server.addConnector(_connector); _server.setHandler(new HandlerWrapper()); _server.start(); diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLEngineTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLEngineTest.java index 29db142e7dd..564e9c14807 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLEngineTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLEngineTest.java @@ -109,6 +109,7 @@ public class SSLEngineTest http.getHttpConfiguration().setRequestHeaderSize(512); connector=new ServerConnector(server, sslContextFactory, http); connector.setPort(0); + connector.getConnectionFactory(HttpConnectionFactory.class).getHttpConfiguration().setSendDateHeader(false); server.addConnector(connector); } diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java index bbcb708de63..abfe5558ea5 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java @@ -40,6 +40,7 @@ import javax.servlet.http.HttpServletResponseWrapper; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Handler; +import org.eclipse.jetty.server.HttpConnectionFactory; import org.eclipse.jetty.server.LocalConnector; import org.eclipse.jetty.server.QuietServletException; import org.eclipse.jetty.server.Request; @@ -70,6 +71,7 @@ public class AsyncContextTest _contextHandler = new ServletContextHandler(ServletContextHandler.NO_SESSIONS); _connector = new LocalConnector(_server); _connector.setIdleTimeout(5000); + _connector.getConnectionFactory(HttpConnectionFactory.class).getHttpConfiguration().setSendDateHeader(false); _server.setConnectors(new Connector[] { _connector }); diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DispatcherTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DispatcherTest.java index 6bc920f362d..8ed551d5d47 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DispatcherTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DispatcherTest.java @@ -78,6 +78,7 @@ public class DispatcherTest _server = new Server(); _connector = new LocalConnector(_server); _connector.getConnectionFactory(HttpConfiguration.ConnectionFactory.class).getHttpConfiguration().setSendServerVersion(false); + _connector.getConnectionFactory(HttpConfiguration.ConnectionFactory.class).getHttpConfiguration().setSendDateHeader(false); _contextCollection = new ContextHandlerCollection(); _contextHandler = new ServletContextHandler(); diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/InvokerTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/InvokerTest.java index 13dfacebecb..d94f6cd7ca5 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/InvokerTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/InvokerTest.java @@ -49,6 +49,7 @@ public class InvokerTest _server = new Server(); _connector = new LocalConnector(_server); _connector.getConnectionFactory(HttpConfiguration.ConnectionFactory.class).getHttpConfiguration().setSendServerVersion(false); + _connector.getConnectionFactory(HttpConfiguration.ConnectionFactory.class).getHttpConfiguration().setSendDateHeader(false); ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); _server.addConnector(_connector);