diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d1903eba346..84534fe4260 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,13 @@ Thanks for your interest in this project. Project description -------------------- -Jetty is a lightweight highly scalable java based web server and servlet engine. Our goal is to support web protocols like HTTP, HTTP/2, SPDY, and WebSocket in a high volume low latency way that provides maximum performance while retaining the ease of use and compatibility with years of servlet development. Jetty is a modern fully async web server that has a long history as a component oriented technology easily embedded into applications while still offering a solid traditional distribution for webapp deployment. +Jetty is a lightweight highly scalable java based web server and servlet engine. +Our goal is to support web protocols like HTTP, HTTP/2, and WebSocket in a high +volume low latency way that provides maximum performance while retaining the ease +of use and compatibility with years of servlet development. +Jetty is a modern fully async web server that has a long history as a component +oriented technology easily embedded into applications while still offering a solid +traditional distribution for webapp deployment. - [https://projects.eclipse.org/projects/rt.jetty](https://projects.eclipse.org/projects/rt.jetty) @@ -14,7 +20,10 @@ Information regarding source code management, builds, coding standards, and more - [https://www.eclipse.org/jetty/documentation/current/advanced-contributing.html](https://www.eclipse.org/jetty/documentation/current/advanced-contributing.html) -The canonical Jetty git repository is located at git.eclipse.org and we are unable to directly merge pull requests into the GitHub mirrored repository. Providing you have completed the contributors agreement mentioned below we will endeavor to pull your commit into Jetty proper. +The canonical Jetty git repository is located at git.eclipse.org and we are unable +to directly merge pull requests into the GitHub mirrored repository. +Providing you have completed the contributors agreement mentioned below we will +endeavor to pull your commit into Jetty proper. Contributor License Agreement ------------------------------ diff --git a/README.md b/README.md index 6ff039659d1..9b53ea86d07 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,13 @@ Project description ============ -Jetty is a lightweight highly scalable java based web server and servlet engine. Our goal is to support web protocols like HTTP, HTTP/2, SPDY, and WebSocket in a high volume low latency way that provides maximum performance while retaining the ease of use and compatibility with years of servlet development. Jetty is a modern fully async web server that has a long history as a component oriented technology easily embedded into applications while still offering a solid traditional distribution for webapp deployment. +Jetty is a lightweight highly scalable java based web server and servlet engine. +Our goal is to support web protocols like HTTP, HTTP/2 and WebSocket in a high +volume low latency way that provides maximum performance while retaining the ease +of use and compatibility with years of servlet development. Jetty is a modern +fully async web server that has a long history as a component oriented technology +easily embedded into applications while still offering a solid traditional +distribution for webapp deployment. - [https://projects.eclipse.org/projects/rt.jetty](https://projects.eclipse.org/projects/rt.jetty) diff --git a/examples/embedded/src/main/java/org/eclipse/jetty/embedded/Http2Server.java b/examples/embedded/src/main/java/org/eclipse/jetty/embedded/Http2Server.java index d83c76f11e9..cd001135f49 100644 --- a/examples/embedded/src/main/java/org/eclipse/jetty/embedded/Http2Server.java +++ b/examples/embedded/src/main/java/org/eclipse/jetty/embedded/Http2Server.java @@ -22,7 +22,6 @@ package org.eclipse.jetty.embedded; import java.io.IOException; import java.util.Date; import java.util.EnumSet; - import javax.servlet.DispatcherType; import javax.servlet.Filter; import javax.servlet.FilterChain; @@ -79,12 +78,12 @@ public class Http2Server http_config.setSendXPoweredBy(true); http_config.setSendServerVersion(true); - // HTTP connector + // HTTP Connector ServerConnector http = new ServerConnector(server,new HttpConnectionFactory(http_config)); http.setPort(8080); server.addConnector(http); - // SSL Context Factory for HTTPS and SPDY + // SSL Context Factory for HTTPS and HTTP/2 String jetty_distro = System.getProperty("jetty.distro","../../jetty-distribution/target/distribution"); SslContextFactory sslContextFactory = new SslContextFactory(); sslContextFactory.setKeyStorePath(jetty_distro + "/etc/keystore"); @@ -95,17 +94,17 @@ public class Http2Server HttpConfiguration https_config = new HttpConfiguration(http_config); https_config.addCustomizer(new SecureRequestCustomizer()); - // HTTP2 factory + // HTTP/2 Connection Factory HTTP2ServerConnectionFactory h2 = new HTTP2ServerConnectionFactory(https_config); NegotiatingServerConnectionFactory.checkProtocolNegotiationAvailable(); ALPNServerConnectionFactory alpn = new ALPNServerConnectionFactory(); alpn.setDefaultProtocol(http.getDefaultProtocol()); - // SSL Factory + // SSL Connection Factory SslConnectionFactory ssl = new SslConnectionFactory(sslContextFactory,alpn.getProtocol()); - // HTTP2 Connector + // HTTP/2 Connector ServerConnector http2Connector = new ServerConnector(server,ssl,alpn,h2,new HttpConnectionFactory(https_config)); http2Connector.setPort(8443); diff --git a/examples/embedded/src/main/java/org/eclipse/jetty/embedded/ManyConnectors.java b/examples/embedded/src/main/java/org/eclipse/jetty/embedded/ManyConnectors.java index 27be399dc0a..0235ffdeb74 100644 --- a/examples/embedded/src/main/java/org/eclipse/jetty/embedded/ManyConnectors.java +++ b/examples/embedded/src/main/java/org/eclipse/jetty/embedded/ManyConnectors.java @@ -18,10 +18,10 @@ package org.eclipse.jetty.embedded; -import org.eclipse.jetty.http.HttpVersion; import java.io.File; import java.io.FileNotFoundException; +import org.eclipse.jetty.http.HttpVersion; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.HttpConfiguration; import org.eclipse.jetty.server.HttpConnectionFactory; @@ -78,7 +78,7 @@ public class ManyConnectors http.setPort(8080); http.setIdleTimeout(30000); - // SSL Context Factory for HTTPS and SPDY + // SSL Context Factory for HTTPS // SSL requires a certificate so we configure a factory for ssl contents // with information pointing to what keystore the ssl connection needs // to know about. Much more configuration is available the ssl context, diff --git a/examples/embedded/src/main/resources/jetty-logging.properties b/examples/embedded/src/main/resources/jetty-logging.properties index d353093d6fc..04163c07af7 100644 --- a/examples/embedded/src/main/resources/jetty-logging.properties +++ b/examples/embedded/src/main/resources/jetty-logging.properties @@ -3,10 +3,8 @@ org.eclipse.jetty.LEVEL=INFO org.eclipse.jetty.STACKS=true org.eclipse.jetty.SOURCE=false #org.eclipse.jetty.STACKS=false -#org.eclipse.jetty.spdy.LEVEL=DEBUG #org.eclipse.jetty.server.LEVEL=DEBUG #org.eclipse.jetty.io.LEVEL=DEBUG #org.eclipse.jetty.io.ssl.LEVEL=DEBUG -#org.eclipse.jetty.spdy.server.LEVEL=DEBUG #org.eclipse.jetty.server.LEVEL=DEBUG #org.eclipse.jetty.servlets.LEVEL=DEBUG diff --git a/examples/embedded/src/test/java/org/eclipse/jetty/embedded/TestXml.java b/examples/embedded/src/test/java/org/eclipse/jetty/embedded/TestXml.java index 7bfe1b84e81..0bdd86d9894 100644 --- a/examples/embedded/src/test/java/org/eclipse/jetty/embedded/TestXml.java +++ b/examples/embedded/src/test/java/org/eclipse/jetty/embedded/TestXml.java @@ -25,12 +25,7 @@ public class TestXml public static void main(String[] args) throws Exception { System.setProperty("jetty.home","../jetty-distribution/target/distribution"); - XmlConfiguration.main(new String[] - { - "../jetty-jmx/src/main/config/etc/jetty-jmx.xml", - "../jetty-server/src/main/config/etc/jetty.xml", - "../jetty-spdy/spdy-jetty-http-webapp/src/main/config/etc/jetty-spdy.xml" - } - ); + XmlConfiguration.main("../jetty-jmx/src/main/config/etc/jetty-jmx.xml", + "../jetty-server/src/main/config/etc/jetty.xml"); } } diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn.mod index 128adda811a..ba406f03d70 100644 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn.mod +++ b/jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn.mod @@ -1,9 +1,8 @@ # ALPN is provided via a -Xbootclasspath that modifies the secure connections -# in java to support the ALPN layer needed for SPDY (and eventually HTTP/2) +# in java to support the ALPN layer needed for HTTP/2. # # This modification has a tight dependency on specific recent updates of -# Java 1.7 and Java 1.8 -# (Java versions prior to 1.7u40 are not supported) +# Java 1.7 and Java 1.8 (Java versions prior to 1.7u40 are not supported). # # The alpn protonego module will use an appropriate alpn-boot jar for your # specific version of Java. diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClientTransport.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClientTransport.java index 4d16d0ff372..a7a845b0ad4 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClientTransport.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClientTransport.java @@ -31,8 +31,8 @@ import org.eclipse.jetty.io.ClientConnectionFactory; * how a HTTP exchange is carried over the network depends on implementations of this class. *
* The default implementation uses the HTTP protocol to carry over the network the HTTP exchange, - * but the HTTP exchange may also be carried using the SPDY protocol or the FCGI protocol or, in future, - * other protocols. + * but the HTTP exchange may also be carried using the FCGI protocol, the HTTP/2 protocol or, + * in future, other protocols. */ public interface HttpClientTransport extends ClientConnectionFactory { @@ -54,7 +54,7 @@ public interface HttpClientTransport extends ClientConnectionFactory * Creates a new, transport-specific, {@link HttpDestination} object. * * {@link HttpDestination} controls the destination-connection cardinality: protocols like - * HTTP have 1-N cardinality, while multiplexed protocols like SPDY have a 1-1 cardinality. + * HTTP have 1-N cardinality, while multiplexed protocols like HTTP/2 have a 1-1 cardinality. * * @param origin the destination origin * @return a new, transport-specific, {@link HttpDestination} object diff --git a/jetty-deploy/src/test/resources/jetty.xml b/jetty-deploy/src/test/resources/jetty.xml index 25332f61255..9beb268a95c 100644 --- a/jetty-deploy/src/test/resources/jetty.xml +++ b/jetty-deploy/src/test/resources/jetty.xml @@ -64,14 +64,14 @@ - + - - - + + + diff --git a/jetty-distribution/src/main/resources/bin/jetty.sh b/jetty-distribution/src/main/resources/bin/jetty.sh index da6f571a6e7..8707f8753df 100755 --- a/jetty-distribution/src/main/resources/bin/jetty.sh +++ b/jetty-distribution/src/main/resources/bin/jetty.sh @@ -69,7 +69,7 @@ NAME=$(echo $(basename $0) | sed -e 's/^[SK][0-9]*//' -e 's/\.sh$//') # JETTY_ARGS # The default arguments to pass to jetty. # For example -# JETTY_ARGS=jetty.port=8080 jetty.spdy.port=8443 jetty.secure.port=443 +# JETTY_ARGS=jetty.port=8080 jetty.secure.port=443 # # JETTY_USER # if set, then used as a username to run the server as diff --git a/jetty-distribution/src/main/resources/demo-base/webapps/ROOT/index.html b/jetty-distribution/src/main/resources/demo-base/webapps/ROOT/index.html index ce03053d93b..4d5a13f24d3 100644 --- a/jetty-distribution/src/main/resources/demo-base/webapps/ROOT/index.html +++ b/jetty-distribution/src/main/resources/demo-base/webapps/ROOT/index.html @@ -21,7 +21,7 @@ Container which supports asynchronous server and client implementations of the HTTP, Websocket and SPDY protocols. The + href="http://en.wikipedia.org/wiki/HTTP/2">HTTP/2 protocols. The project is 100% Open Source and hosted by the Eclipse Foundation at http://www.eclipse.org/jetty. diff --git a/jetty-distribution/src/main/resources/modules/protonego.mod b/jetty-distribution/src/main/resources/modules/protonego.mod index fbf4d080e0e..f0b326b7e91 100644 --- a/jetty-distribution/src/main/resources/modules/protonego.mod +++ b/jetty-distribution/src/main/resources/modules/protonego.mod @@ -8,17 +8,10 @@ protonego-impl/${protonego} [ini-template] # Protocol Negotiation Implementation Selection # choices are: -# 'npn' : original implementation for SPDY (now deprecated) -# 'alpn' : replacement for NPN, in use by current SPDY implementations -# and the future HTTP/2 spec +# 'alpn' : in use by current HTTP/2 implementation. # Note: java 1.8+ are ALPN only. protonego=alpn -# Configuration for NPN -# npn.protocols=spdy/3,http/1.1 -# npn.defaultProtocol=http/1.1 - # Configuration for ALPN # alpn.protocols=h2-14,http/1.1 # alpn.defaultProtocol=http/1.1 - diff --git a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/api/Session.java b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/api/Session.java index 18491d05591..01b8c89ceb5 100644 --- a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/api/Session.java +++ b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/api/Session.java @@ -45,8 +45,6 @@ public interface Session public Stream getStream(int streamId); - // TODO: remote and local address, etc. see SPDY's Session - public interface Listener { public MapAn abstract implementation of {@link Connector} that provides a {@link ConnectionFactory} mechanism - * for creating {@link Connection} instances for various protocols (HTTP, SSL, SPDY, etc).
+ * for creating {@link Connection} instances for various protocols (HTTP, SSL, etc). * ** Each Connection factory type is responsible for the configuration of the protocols that it accepts. Thus to * configure the HTTP protocol, you pass a {@link HttpConfiguration} instance to the {@link HttpConnectionFactory} - * (or the SPDY factories that can also provide HTTP Semantics). Similarly the {@link SslConnectionFactory} is + * (or other factories that can also provide HTTP Semantics). Similarly the {@link SslConnectionFactory} is * configured by passing it a {@link SslContextFactory} and a next protocol name. * *
* {@link ConnectionFactory}s may also create temporary {@link Connection} instances that will exchange bytes - * over the connection to determine what is the next protocol to use. For example the NPN protocol is an extension - * of SSL to allow a protocol to be specified during the SSL handshake. NPN is used by the SPDY protocol to - * negotiate the version of SPDY or HTTP that the client and server will speak. Thus to accept a SPDY connection, the - * connector will be configured with {@link ConnectionFactory}s for "SSL-NPN", "NPN", "spdy/3", "spdy/2", "http/1.1" - * with the default protocol being "SSL-NPN". Thus a newly accepted connection uses "SSL-NPN", which specifies a - * SSLConnectionFactory with "NPN" as the next protocol. Thus an SslConnection instance is created chained to an NPNConnection - * instance. The NPN connection then negotiates with the client to determined the next protocol, which could be - * "spdy/3", "spdy/2" or the default of "http/1.1". Once the next protocol is determined, the NPN connection - * calls {@link #getConnectionFactory(String)} to create a connection instance that will replace the NPN connection as - * the connection chained to the SSLConnection. + * over the connection to determine what is the next protocol to use. For example the ALPN protocol is an extension + * of SSL to allow a protocol to be specified during the SSL handshake. ALPN is used by the HTTP/2 protocol to + * negotiate the protocol that the client and server will speak. Thus to accept a HTTP/2 connection, the + * connector will be configured with {@link ConnectionFactory}s for "SSL-ALPN", "h2", "http/1.1" + * with the default protocol being "SSL-ALPN". Thus a newly accepted connection uses "SSL-ALPN", which specifies a + * SSLConnectionFactory with "ALPN" as the next protocol. Thus an SSL connection instance is created chained to an ALPN + * connection instance. The ALPN connection then negotiates with the client to determined the next protocol, which + * could be "h2" or the default of "http/1.1". Once the next protocol is determined, the ALPN connection + * calls {@link #getConnectionFactory(String)} to create a connection instance that will replace the ALPN connection as + * the connection chained to the SSL connection. *
*
This class is a holder of HTTP configuration for use by the * {@link HttpChannel} class. Typically a HTTPConfiguration instance * is instantiated and passed to a {@link ConnectionFactory} that can - * create HTTP channels (eg HTTP, AJP or SPDY).
+ * create HTTP channels (e.g. HTTP, AJP or FCGI). *The configuration held by this class is not for the wire protocol, * but for the interpretation and handling of HTTP requests that could * be transported by a variety of protocols. diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java index 63cf8b5bda0..e2bed86dcb8 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java @@ -47,7 +47,7 @@ import org.eclipse.jetty.util.thread.Scheduler; /** * This {@link Connector} implementation is the primary connector for the * Jetty server over TCP/IP. By the use of various {@link ConnectionFactory} instances it is able - * to accept connections for HTTP, SPDY and WebSocket, either directly or over SSL. + * to accept connections for HTTP, HTTP/2 and WebSocket, either directly or over SSL. *
* The connector is a fully asynchronous NIO based implementation that by default will * use all the commons services (eg {@link Executor}, {@link Scheduler}) of the diff --git a/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java b/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java index a2f959cf2d3..8d64d000154 100644 --- a/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java +++ b/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java @@ -21,7 +21,6 @@ package org.eclipse.jetty; import java.io.File; import java.io.IOException; import java.lang.management.ManagementFactory; - import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -93,43 +92,7 @@ public class TestServer httpConnector.setIdleTimeout(30000); server.addConnector(httpConnector); - /* - // SSL configurations - SslContextFactory sslContextFactory = new SslContextFactory(); - sslContextFactory.setKeyStorePath(jetty_root + "/jetty-server/src/main/config/etc/keystore"); - sslContextFactory.setKeyStorePassword("OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4"); - sslContextFactory.setKeyManagerPassword("OBF:1u2u1wml1z7s1z7a1wnl1u2g"); - sslContextFactory.setTrustStorePath(jetty_root + "/jetty-server/src/main/config/etc/keystore"); - sslContextFactory.setTrustStorePassword("OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4"); - sslContextFactory.setExcludeCipherSuites( - "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"); - - - // Spdy Connector - SPDYServerConnectionFactory.checkNPNAvailable(); - PushStrategy push = new ReferrerPushStrategy(); - HTTPSPDYServerConnectionFactory spdy2 = new HTTPSPDYServerConnectionFactory(2,config,push); - spdy2.setInputBufferSize(8192); - spdy2.setInitialWindowSize(32768); - HTTPSPDYServerConnectionFactory spdy3 = new HTTPSPDYServerConnectionFactory(3,config,push); - spdy2.setInputBufferSize(8192); - NPNServerConnectionFactory npn = new NPNServerConnectionFactory(spdy3.getProtocol(),spdy2.getProtocol(),http.getProtocol()); - npn.setDefaultProtocol(http.getProtocol()); - npn.setInputBufferSize(1024); - SslConnectionFactory ssl = new SslConnectionFactory(sslContextFactory,npn.getProtocol()); - ServerConnector spdyConnector = new ServerConnector(server,ssl,npn,spdy3,spdy2,http); - spdyConnector.setPort(8443); - spdyConnector.setIdleTimeout(15000); - server.addConnector(spdyConnector); - - */ - + // Handlers HandlerCollection handlers = new HandlerCollection(); ContextHandlerCollection contexts = new ContextHandlerCollection();