Merge branch 'jetty-9.3.x' of github.com:eclipse/jetty.project into jetty-9.3.x
This commit is contained in:
commit
0bad6d1e90
|
@ -38,7 +38,7 @@ node {
|
|||
stage('Javadoc') {
|
||||
withEnv(mvnEnv) {
|
||||
timeout(time: 20, unit: 'MINUTES') {
|
||||
sh "mvn --offline -B javadoc:javadoc"
|
||||
sh "mvn -B javadoc:javadoc"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
47
VERSION.txt
47
VERSION.txt
|
@ -1,4 +1,38 @@
|
|||
jetty-9.3.20-SNAPSHOT
|
||||
jetty-9.3.22-SNAPSHOT
|
||||
|
||||
jetty-9.3.21.M0 - 01 August 2017
|
||||
+ 1357 RolloverFileOutputStream: No rollout performed at midnight
|
||||
+ 1469 RolloverFileOutputStream: IllegalStateException Task already scheduled
|
||||
+ 1507 RolloverFileOutputStream: Negative delay Timer.schedule exception
|
||||
+ 1513 RolloverFileOutputStream: can't handle multiple instances
|
||||
+ 1655 Improve extensibility of ServerConnector
|
||||
+ 1661 AbstractProxyServlet onProxyResponseFailure Error
|
||||
+ 1664 IPAccessHandler CIDR IP range check is incorrect
|
||||
+ 1685 Update ALPN support for Java 8u141
|
||||
+ 1687 HTTP2: Correcting missing callback notification when channel not found
|
||||
+ 1702 Update ALPN support for Java 8u144
|
||||
+ 1703 Improve HttpInput failure logging
|
||||
|
||||
jetty-9.3.20.v20170531 - 31 May 2017
|
||||
+ 523 TLS close behaviour breaking session resumption
|
||||
+ 1108 Please improve logging in SslContextFactory when there are no approved
|
||||
cipher suites
|
||||
+ 1527 Jetty BOM should not depend on jetty-parent
|
||||
+ 1556 A timing channel in Password.java
|
||||
+ 1567 XmlConfiguration will start the same object multiple times
|
||||
|
||||
jetty-9.2.22.v20170606 - 06 June 2017
|
||||
+ 920 no main manifest attribute, in jetty-runner-9.2.19.v20160908.jar
|
||||
+ 1108 Please improve logging in SslContextFactory when there are no approved
|
||||
cipher suites
|
||||
+ 1357 RolloverFileOutputStream: No rollout performed at midnight
|
||||
+ 1469 IllegalStateException in RolloverFileOutputStream
|
||||
+ 1507 Negative delay Timer.schedule exception due to mismatched local and
|
||||
_logTimeZone values
|
||||
+ 1532 RolloverFileOutputStream can't handle multiple instances
|
||||
+ 1523 Update ALPN support for Java 8u131
|
||||
+ 1556 A timing channel in Password.java
|
||||
+ 1590 RolloverFileOutputStream not functioning in Jetty 9.2.21+
|
||||
|
||||
jetty-9.3.19.v20170502 - 02 May 2017
|
||||
+ 877 Programmatic servlet mappings cannot override mappings from
|
||||
|
@ -137,6 +171,17 @@ jetty-9.2.21.v20170120 - 20 January 2017
|
|||
+ 1267 Request.getRemoteUser can throw undeclared IllegalStateException via
|
||||
DeferredAuthentication & FormAuthenticator
|
||||
|
||||
jetty-9.2.20.v20161216 - 16 December 2016
|
||||
+ 295 Ensure Jetty Client use of Deflater / Inflater calls .end() to avoid
|
||||
memory leak
|
||||
+ Reset Response buffer size
|
||||
+ 1051 NCSARequestLog/RolloverFileOutputStream does not roll day after DST
|
||||
ends
|
||||
+ 1057 Improve WebSocketUpgradeFilter fast path performance
|
||||
+ 1090 Allow WebSocketUpgradeFilter to be used by WEB-INF/web.xml
|
||||
+ 1124 Allow configuration of WebSocket mappings from Spring
|
||||
+ 1130 PROXY protocol support reports incorrect remote address
|
||||
|
||||
jetty-9.3.14.v20161028 - 28 October 2016
|
||||
+ 292 NPE in SslConnectionFactory newConnection
|
||||
+ 295 Ensure Jetty Client use of Deflater / Inflater calls .end() to avoid
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -20,8 +20,6 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>8</source>
|
||||
<target>8</target>
|
||||
<compilerArgs>
|
||||
<arg>-profile</arg>
|
||||
<arg>compact3</arg>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>apache-jsp</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>apache-jstl</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>example-async-rest</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.eclipse.jetty.example-async-rest</groupId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>example-async-rest</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.eclipse.jetty.example-async-rest</groupId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.examples</groupId>
|
||||
<artifactId>examples-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.examples</groupId>
|
||||
<artifactId>examples-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<groupId>org.eclipse.jetty.examples</groupId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-alpn-client</artifactId>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -24,6 +24,7 @@
|
|||
<configuration>
|
||||
<source>1.9</source>
|
||||
<target>1.9</target>
|
||||
<release>9</release>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -23,6 +23,7 @@
|
|||
<configuration>
|
||||
<source>1.9</source>
|
||||
<target>1.9</target>
|
||||
<release>9</release>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-alpn-server</artifactId>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[name]
|
||||
protonego-boot
|
||||
alpn-boot
|
||||
|
||||
[files]
|
||||
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar|lib/alpn/alpn-boot-8.1.11.v20170118.jar
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
[name]
|
||||
alpn-boot
|
||||
|
||||
[files]
|
||||
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar|lib/alpn/alpn-boot-8.1.11.v20170118.jar
|
||||
|
||||
[exec]
|
||||
-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.11.v20170118.jar
|
|
@ -0,0 +1,8 @@
|
|||
[name]
|
||||
alpn-boot
|
||||
|
||||
[files]
|
||||
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar|lib/alpn/alpn-boot-8.1.11.v20170118.jar
|
||||
|
||||
[exec]
|
||||
-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.11.v20170118.jar
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-alpn-parent</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-annotations</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-ant</artifactId>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-bom</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
<name>Jetty :: Bom</name>
|
||||
<description>Jetty BOM artifact</description>
|
||||
<url>http://www.eclipse.org/jetty</url>
|
||||
|
@ -84,7 +84,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.10.4</version>
|
||||
<version>3.0.0-M1</version>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
|
@ -98,7 +98,7 @@
|
|||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-annotations</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
|
@ -123,12 +123,12 @@
|
|||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-client</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-continuation</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
|
@ -143,52 +143,52 @@
|
|||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-http</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-http-spi</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-infinispan</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-io</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jaas</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jaspi</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jmx</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jndi</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-monitor</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-nosql</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
|
@ -208,62 +208,62 @@
|
|||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-plus</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-proxy</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-quickstart</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-rewrite</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-security</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlet</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlets</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-spring</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-util</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-util-ajax</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-webapp</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
|
@ -303,7 +303,7 @@
|
|||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-xml</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>jetty-cdi-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cdi-core</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>jetty-cdi-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cdi-full-servlet</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>jetty-cdi-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cdi-servlet</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>jetty-cdi-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cdi-websocket</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>jetty-cdi-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>test-cdi-webapp</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.io.Closeable;
|
|||
import java.io.IOException;
|
||||
import java.nio.channels.AsynchronousCloseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
|
@ -40,6 +41,7 @@ import org.eclipse.jetty.util.annotation.ManagedAttribute;
|
|||
import org.eclipse.jetty.util.annotation.ManagedObject;
|
||||
import org.eclipse.jetty.util.component.ContainerLifeCycle;
|
||||
import org.eclipse.jetty.util.component.Dumpable;
|
||||
import org.eclipse.jetty.util.component.DumpableCollection;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
|
||||
|
@ -266,16 +268,11 @@ public abstract class HttpDestination extends ContainerLifeCycle implements Dest
|
|||
exchange.getRequest().abort(cause);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String dump()
|
||||
{
|
||||
return ContainerLifeCycle.dump(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(Appendable out, String indent) throws IOException
|
||||
{
|
||||
ContainerLifeCycle.dumpObject(out, toString());
|
||||
super.dump(out, indent);
|
||||
ContainerLifeCycle.dump(out, indent, Collections.singleton(new DumpableCollection("exchanges", exchanges)));
|
||||
}
|
||||
|
||||
public String asString()
|
||||
|
|
|
@ -18,15 +18,11 @@
|
|||
|
||||
package org.eclipse.jetty.client;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.eclipse.jetty.client.api.Connection;
|
||||
import org.eclipse.jetty.client.api.Request;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.annotation.ManagedAttribute;
|
||||
import org.eclipse.jetty.util.annotation.ManagedObject;
|
||||
import org.eclipse.jetty.util.component.ContainerLifeCycle;
|
||||
import org.eclipse.jetty.util.thread.Sweeper;
|
||||
|
||||
@ManagedObject
|
||||
|
@ -37,11 +33,6 @@ public abstract class PoolingHttpDestination<C extends Connection> extends HttpD
|
|||
public PoolingHttpDestination(HttpClient client, Origin origin)
|
||||
{
|
||||
super(client, origin);
|
||||
this.connectionPool = newConnectionPool(client);
|
||||
addBean(connectionPool);
|
||||
Sweeper sweeper = client.getBean(Sweeper.class);
|
||||
if (sweeper != null)
|
||||
sweeper.offer(connectionPool);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -249,13 +240,6 @@ public abstract class PoolingHttpDestination<C extends Connection> extends HttpD
|
|||
connectionPool.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(Appendable out, String indent) throws IOException
|
||||
{
|
||||
super.dump(out, indent);
|
||||
ContainerLifeCycle.dump(out, indent, Collections.singletonList(connectionPool));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
|
|
@ -59,6 +59,7 @@ public class HttpDestinationOverHTTPTest extends AbstractHttpClientServerTest
|
|||
public void test_FirstAcquire_WithEmptyQueue() throws Exception
|
||||
{
|
||||
HttpDestinationOverHTTP destination = new HttpDestinationOverHTTP(client, new Origin("http", "localhost", connector.getLocalPort()));
|
||||
destination.start();
|
||||
Connection connection = destination.acquire();
|
||||
if (connection == null)
|
||||
{
|
||||
|
@ -72,6 +73,7 @@ public class HttpDestinationOverHTTPTest extends AbstractHttpClientServerTest
|
|||
public void test_SecondAcquire_AfterFirstAcquire_WithEmptyQueue_ReturnsSameConnection() throws Exception
|
||||
{
|
||||
HttpDestinationOverHTTP destination = new HttpDestinationOverHTTP(client, new Origin("http", "localhost", connector.getLocalPort()));
|
||||
destination.start();
|
||||
Connection connection1 = destination.acquire();
|
||||
if (connection1 == null)
|
||||
{
|
||||
|
@ -118,6 +120,7 @@ public class HttpDestinationOverHTTPTest extends AbstractHttpClientServerTest
|
|||
};
|
||||
}
|
||||
};
|
||||
destination.start();
|
||||
Connection connection1 = destination.acquire();
|
||||
|
||||
// Make sure we entered idleCreated().
|
||||
|
@ -145,6 +148,7 @@ public class HttpDestinationOverHTTPTest extends AbstractHttpClientServerTest
|
|||
public void test_Acquire_Process_Release_Acquire_ReturnsSameConnection() throws Exception
|
||||
{
|
||||
HttpDestinationOverHTTP destination = new HttpDestinationOverHTTP(client, new Origin("http", "localhost", connector.getLocalPort()));
|
||||
destination.start();
|
||||
HttpConnectionOverHTTP connection1 = destination.acquire();
|
||||
|
||||
long start = System.nanoTime();
|
||||
|
@ -172,6 +176,7 @@ public class HttpDestinationOverHTTPTest extends AbstractHttpClientServerTest
|
|||
client.setIdleTimeout(idleTimeout);
|
||||
|
||||
HttpDestinationOverHTTP destination = new HttpDestinationOverHTTP(client, new Origin("http", "localhost", connector.getLocalPort()));
|
||||
destination.start();
|
||||
Connection connection1 = destination.acquire();
|
||||
if (connection1 == null)
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-continuation</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-deploy</artifactId>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-distribution</artifactId>
|
||||
|
@ -822,6 +822,11 @@
|
|||
<artifactId>jetty-infinispan</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-hazelcast</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.gcloud</groupId>
|
||||
<artifactId>jetty-gcloud-session-manager</artifactId>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-documentation</artifactId>
|
||||
<name>Jetty :: Documentation</name>
|
||||
|
|
|
@ -245,6 +245,8 @@ The ALPN implementation, relying on modifications of OpenJDK classes, updates ev
|
|||
|1.8.0u112 |8.1.10.v20161026
|
||||
|1.8.0u121 |8.1.11.v20170118
|
||||
|1.8.0u131 |8.1.11.v20170118
|
||||
|1.8.0u141 |8.1.11.v20170118
|
||||
|1.8.0u144 |8.1.11.v20170118
|
||||
|=============================
|
||||
|
||||
[[alpn-build]]
|
||||
|
|
|
@ -37,22 +37,26 @@ Some user-agents might be excluded from compression to avoid common browser bugs
|
|||
The `GzipHandler` is added to the entire server by the `etc/jetty-gzip.xml` file from the `gzip.mod` module.
|
||||
It may also be added to individual contexts in a context xml file.
|
||||
|
||||
____
|
||||
[NOTE]
|
||||
Jetty 9 only compresses using GZip.
|
||||
Using deflate http compression is not supported and will not function.
|
||||
____
|
||||
|
||||
[[gzip-filter-rules]]
|
||||
==== Gzip Rules
|
||||
|
||||
`GzipHandler` will gzip or deflate the content of a response if:
|
||||
`GzipHandler` will gzip the content of a response if:
|
||||
|
||||
* It is mapped to a matching path
|
||||
* The request method is configured to support gzip
|
||||
* The request is not from an excluded User-Agent
|
||||
* accept-encoding header is set to either gzip, deflate or a combination of those
|
||||
* accept-encoding header is set to gzip
|
||||
* The response status code is >=200 and <300
|
||||
* The content length is unknown or more than the minGzipSize initParameter or the minGzipSize is 0(default)
|
||||
* The content-type does not match an excluded mime-type
|
||||
* No content-encoding is specified by the resource
|
||||
|
||||
If both gzip and deflate are specified in the accept-encoding header, then gzip will be used.
|
||||
|
||||
Compressing the content can greatly improve the network bandwidth usage, but at the cost of memory and CPU cycles.
|
||||
The link:#default-servlet[DefaultServlet] is capable of serving pre-compressed static content, which saves memory and CPU.
|
||||
By default, the `GzipHandler` will check to see if pre-compressed content exists, and pass the request through to be handled by the `DefaultServlet`.
|
||||
|
@ -65,8 +69,6 @@ Content will only be compressed if content length is either unknown or greater t
|
|||
checkGzExists::
|
||||
True by default.
|
||||
If set to false, the handler will not check for pre-compressed content.
|
||||
compressionLevel::
|
||||
The compression level used for deflate compression. (0-9).
|
||||
includedMethods::
|
||||
List of HTTP methods to compress.
|
||||
If not set, only `GET` requests are compressed.
|
||||
|
|
|
@ -22,4 +22,5 @@ include::using-persistent-sessions.adoc[]
|
|||
include::session-clustering-jdbc.adoc[]
|
||||
include::session-clustering-mongodb.adoc[]
|
||||
include::session-clustering-infinispan.adoc[]
|
||||
include::session-configuration-hazelcast.adoc[]
|
||||
include::session-clustering-gcloud-datastore.adoc[]
|
|
@ -0,0 +1,134 @@
|
|||
// ========================================================================
|
||||
// Copyright (c) 1995-2017 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.
|
||||
// ========================================================================
|
||||
|
||||
[[configuring-sessions-hazelcast]]
|
||||
|
||||
=== Clustered Session Management: Hazelcast
|
||||
|
||||
==== Enabling Hazelcast Sessions
|
||||
|
||||
When using the Jetty distribution, you will first need to enable the `session-store-hazelcast-remote` link:#startup-modules[module] for your link:#startup-base-and-home[Jetty base] using the `--add-to-start` argument on the command line.
|
||||
|
||||
[source, screen, subs="{sub-order}"]
|
||||
----
|
||||
mb-olamy:tmp-base olamy$ java -jar ../start.jar --create-startd
|
||||
MKDIR : ${jetty.base}/start.d
|
||||
INFO : Base directory was modified
|
||||
mb-olamy:tmp-base olamy$ java -jar ../start.jar --add-to-start=hazelcast-remote-sessions
|
||||
|
||||
ALERT: There are enabled module(s) with licenses.
|
||||
The following 1 module(s):
|
||||
+ contains software not provided by the Eclipse Foundation!
|
||||
+ contains software not covered by the Eclipse Public License!
|
||||
+ has not been audited for compliance with its license
|
||||
|
||||
Module: hazelcast-remote-sessions
|
||||
+ Hazelcast is an open source project hosted on Github and released under the Apache 2.0 license.
|
||||
+ https://hazelcast.org/
|
||||
+ http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
Proceed (y/N)? y
|
||||
INFO: hazelcast-remote-sessions initialised in ${jetty.base}/start.ini
|
||||
COPY: /Users/olamy/repository/com/hazelcast/hazelcast-all/3.8.2/hazelcast-all-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-all-3.8.2.jar
|
||||
COPY: /Users/olamy/repository/com/hazelcast/hazelcast-jetty9-sessionmanager/1.0.2/hazelcast-jetty9-sessionmanager-1.0.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-jetty9-sessionmanager-1.0.2.jar
|
||||
COPY: /Users/olamy/repository/org/eclipse/jetty/jetty-nosql/9.3.21-SNAPSHOT/jetty-nosql-9.3.21-SNAPSHOT.jar to ${jetty.base}/lib/hazelcast/jetty-nosql-9.3.21-SNAPSHOT.jar
|
||||
INFO: Base directory was modified
|
||||
----
|
||||
|
||||
Doing this enables the remote Hazelcast Session module and any dependent modules or files needed for it to run on the server.
|
||||
The example above is using a fresh `${jetty.base}` with nothing else enabled.
|
||||
Because Hazelcast is not a technology provided by the Eclipse Foundation, users are prompted to assent to the licenses of the external vendor (Apache in this case).
|
||||
|
||||
When the `--add-to-start` argument was added to the command line, it enabled the the `session-store-hazelcast-remote` module as well as the `sessions` and `server` modules, which are required for Hazelcast session management to operate.
|
||||
It also downloaded the needed Hazelcast-specific jar files and created a directory named `${jetty.base}/lib/hazelcast/` to house them.
|
||||
|
||||
In addition to adding these modules to the classpath of the server it also added several ini configuration files to the `${jetty.base}/start.d` directory.
|
||||
|
||||
____
|
||||
[NOTE]
|
||||
If you have updated versions of the jar files automatically downloaded by Jetty, you can place them in the associated `${jetty.base}/lib/` directory and use the `--skip-file-validation=<module name>` command line option to prevent errors when starting your server.
|
||||
____
|
||||
|
||||
==== Configuring Hazelcast Remote Properties
|
||||
|
||||
Opening the `start.ini` will show a list of all the configurable options for the Hazelcast module:
|
||||
|
||||
[source, screen, subs="{sub-order}"]
|
||||
----
|
||||
# ---------------------------------------
|
||||
# Module: session-store-hazelcast-remote
|
||||
--module=session-store-hazelcast-remote
|
||||
|
||||
#jetty.session.hazelcast.configurationLocation=
|
||||
----
|
||||
|
||||
jetty.session.hazelcast.configurationLocation::
|
||||
Path to an an Hazelcast xml configuration file
|
||||
|
||||
==== Configuring Embedded Hazelcast Clustering
|
||||
|
||||
During testing, it can be helpful to run an in-process instance of Hazelcast.
|
||||
To enable this you will first need to enable the `session-store-hazelcast-embedded` link:#startup-modules[module] for your link:#startup-base-and-home[Jetty base] using the `--add-to-start` argument on the command line.
|
||||
|
||||
[source, screen, subs="{sub-order}"]
|
||||
----
|
||||
mb-olamy:tmp-base olamy$ java -jar ../start.jar --create-startd
|
||||
MKDIR : ${jetty.base}/start.d
|
||||
INFO : Base directory was modified
|
||||
mb-olamy:tmp-base olamy$ java -jar ../start.jar --add-to-start=hazelcast-embedded-sessions
|
||||
|
||||
ALERT: There are enabled module(s) with licenses.
|
||||
The following 1 module(s):
|
||||
+ contains software not provided by the Eclipse Foundation!
|
||||
+ contains software not covered by the Eclipse Public License!
|
||||
+ has not been audited for compliance with its license
|
||||
|
||||
Module: hazelcast-embedded-sessions
|
||||
+ Hazelcast is an open source project hosted on Github and released under the Apache 2.0 license.
|
||||
+ https://hazelcast.org/
|
||||
+ http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
Proceed (y/N)? y
|
||||
INFO: hazelcast-embedded-sessions initialised in ${jetty.base}/start.ini
|
||||
COPY: /Users/olamy/repository/com/hazelcast/hazelcast-all/3.8.2/hazelcast-all-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-all-3.8.2.jar
|
||||
COPY: /Users/olamy/repository/com/hazelcast/hazelcast-jetty9-sessionmanager/1.0.2/hazelcast-jetty9-sessionmanager-1.0.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-jetty9-sessionmanager-1.0.2.jar
|
||||
COPY: /Users/olamy/repository/org/eclipse/jetty/jetty-nosql/9.3.21-SNAPSHOT/jetty-nosql-9.3.21-SNAPSHOT.jar to ${jetty.base}/lib/hazelcast/jetty-nosql-9.3.21-SNAPSHOT.jar
|
||||
INFO: Base directory was modified
|
||||
----
|
||||
|
||||
Doing this enables the embedded Hazelcast Session module and any dependent modules or files needed for it to run on the server.
|
||||
The example above is using a fresh `${jetty.base}` with nothing else enabled.
|
||||
Because Hazelcast is not a technology provided by the Eclipse Foundation, users are prompted to assent to the licenses of the external vendor (Apache in this case).
|
||||
|
||||
When the `--add-to-start` argument was added to the command line, it enabled the the `session-store-hazelcast-embedded` module as well as the `sessions` and `server` modules, which are required for Hazelcast session management to operate.
|
||||
It also downloaded the needed Hazelcast-specific jar files and created a directory named `${jetty.base}/lib/hazelcast/` to house them.
|
||||
|
||||
In addition to adding these modules to the classpath of the server it also added several ini configuration files to the `${jetty.base}/start.d` directory.
|
||||
|
||||
==== Configuring Hazelcast Embedded Properties
|
||||
|
||||
Opening the `start.ini` will show a list of all the configurable options for the Hazelcast module:
|
||||
|
||||
[source, screen, subs="{sub-order}"]
|
||||
----
|
||||
# ---------------------------------------
|
||||
# Module: hazelcast-embedded-sessions
|
||||
--module=hazelcast-embedded-sessions
|
||||
|
||||
#jetty.session.hazelcast.configurationLocation=
|
||||
----
|
||||
jetty.session.hazelcast.configurationLocation::
|
||||
Path to an an Hazelcast xml configuration file
|
|
@ -19,6 +19,16 @@
|
|||
|
||||
This document provides an overview of how to configure SSL and TLS for Jetty.
|
||||
|
||||
[[configuring-jetty-for-ssl]]
|
||||
===== Configuring Jetty for SSL
|
||||
|
||||
To configure Jetty for SSL, complete the tasks in the following sections:
|
||||
|
||||
* xref:generating-key-pairs-and-certificates[]
|
||||
* xref:requesting-trusted-certificate[]
|
||||
* xref:loading-keys-and-certificates[]
|
||||
* xref:configuring-sslcontextfactory[]
|
||||
|
||||
[[tls-and-ssl-versions]]
|
||||
==== TLS and SSL versions
|
||||
|
||||
|
@ -78,16 +88,6 @@ Since Apache and other servers commonly use the OpenSSL tool suite to generate a
|
|||
|
||||
If you want the option of using the same certificate with Jetty or a web server such as Apache not written in Java, you might prefer to generate your private key and certificate with OpenSSL.
|
||||
|
||||
[[configuring-jetty-for-ssl]]
|
||||
===== Configuring Jetty for SSL
|
||||
|
||||
To configure Jetty for SSL, complete the tasks in the following sections:
|
||||
|
||||
* xref:generating-key-pairs-and-certificates[]
|
||||
* xref:requesting-trusted-certificate[]
|
||||
* xref:loading-keys-and-certificates[]
|
||||
* xref:configuring-sslcontextfactory[]
|
||||
|
||||
[[generating-key-pairs-and-certificates]]
|
||||
===== Generating Key Pairs and Certificates
|
||||
|
||||
|
@ -354,84 +354,16 @@ $ keytool -importkeystore -srckeystore jetty.pkcs12 -srcstoretype PKCS12 -destke
|
|||
If you are updating your configuration to use a newer certificate, as when the old one is expiring, just load the newer certificate as described in the section, xref:loading-keys-and-certificates[].
|
||||
If you imported the key and certificate originally using the PKCS12 method, use an alias of "1" rather than "jetty", because that is the alias the PKCS12 process enters into the keystore.
|
||||
|
||||
==== Configuring SSL in Jetty Distribution
|
||||
|
||||
For those of you using the Jetty Distribution, enabling SSL support is as easy as activating the `ssl` module.
|
||||
|
||||
An example of this setup:
|
||||
|
||||
[source, plain, subs="{sub-order}"]
|
||||
----
|
||||
$ cd /path/to/mybase
|
||||
$ java -jar /path/to/jetty-dist/start.jar --add-to-start=ssl
|
||||
INFO : server initialised (transitively) in ${jetty.base}/start.d/server.ini
|
||||
INFO : ssl initialised in ${jetty.base}/start.d/ssl.ini
|
||||
INFO : Base directory was modified
|
||||
$ tree
|
||||
.
|
||||
├── etc
|
||||
│ └── keystore
|
||||
└── start.d
|
||||
├── server.ini
|
||||
└── ssl.ini
|
||||
----
|
||||
|
||||
When you open `start.d/ssl.ini`, you will see many commented properties ready for you to configure the `SslContextFactory` basics.
|
||||
|
||||
To highlight some of the more commonly used properties:
|
||||
|
||||
jetty.ssl.host::
|
||||
Configures which interfaces the SSL/TLS Connector should listen on.
|
||||
jetty.ssl.port::
|
||||
Configures which port the SSL/TLS Connector should listen on.
|
||||
jetty.httpConfig.securePort::
|
||||
If a webapp needs to redirect to a secure version of the same resource, then this is the port reported back on the response `location` line (having this be separate is useful if you have something sitting in front of Jetty, such as a Load Balancer or proxy).
|
||||
jetty.sslContext.keyStorePath::
|
||||
Sets the location of the `keystore` that you configured with your certificates.
|
||||
jetty.sslContext.keyStorePassword::
|
||||
Sets the Password for the `keystore`.
|
||||
|
||||
[[two-way-authentication]]
|
||||
==== Two Way Authentication
|
||||
|
||||
To enable two-way authentication, you first need to activate the ssl module as shown in the previous section.
|
||||
|
||||
First you need load the `ssl` module and `https` module.
|
||||
[source%nowrap,ini,linenums]
|
||||
.$JETTY_BASE/start.d/ssl.ini
|
||||
----
|
||||
# Module: ssl
|
||||
--module=ssl
|
||||
|
||||
jetty.ssl.host=0.0.0.0
|
||||
jetty.ssl.port=8583
|
||||
jetty.sslContext.keyStorePath=etc/keystore
|
||||
jetty.sslContext.trustStorePath=etc/keystore
|
||||
jetty.sslContext.keyStorePassword=OBF:
|
||||
jetty.sslContext.keyManagerPassword=OBF:
|
||||
jetty.sslContext.trustStorePassword=OBF:
|
||||
jetty.sslContext.trustStoreType=JKS
|
||||
# enable two way authentication
|
||||
jetty.sslContext.needClientAuth=true
|
||||
----
|
||||
|
||||
[source%nowrap,ini,linenums]
|
||||
.$JETTY_BASE/start.d/https.ini
|
||||
----
|
||||
# Module: https
|
||||
--module=https
|
||||
----
|
||||
|
||||
[[layout-of-keystore-and-truststore]]
|
||||
===== Layout of `keystore` and `truststore`
|
||||
===== Layout of keystore and truststore
|
||||
|
||||
`keystore` only contains the server's private key and certificate.
|
||||
The `keystore` only contains the server's private key and certificate.
|
||||
|
||||
[[img-certificate-chain]]
|
||||
image::images/certificate-chain.png[title="Certificate chain", alt="Certificate chain"]
|
||||
|
||||
[literal]
|
||||
.The structure of KeyStore file
|
||||
.The structure of KeyStore file:
|
||||
....
|
||||
├── PrivateKeyEntry
|
||||
│ ├── PrivateKey
|
||||
|
@ -445,14 +377,10 @@ image::images/certificate-chain.png[title="Certificate chain", alt="Certificate
|
|||
└── Root CA certificate
|
||||
....
|
||||
|
||||
[TIP]
|
||||
====
|
||||
└── PrivateKeyEntry +
|
||||
└── Certificate chain +
|
||||
├── Intermediary CA certificate +
|
||||
└── Root CA certificate +
|
||||
are optional
|
||||
====
|
||||
____
|
||||
[NOTE]
|
||||
Both the `Intermediary CA certificate` and `Root CA certificate` are optional.
|
||||
____
|
||||
|
||||
[source%nowrap,plain,linenums]
|
||||
----
|
||||
|
@ -529,7 +457,7 @@ Certificate fingerprints:
|
|||
Signature algorithm name: SHA256withRSA
|
||||
Version: 3
|
||||
|
||||
Extensions:
|
||||
Extensions:
|
||||
|
||||
#1: ObjectId: 2.5.29.35 Criticality=false
|
||||
AuthorityKeyIdentifier [
|
||||
|
@ -571,7 +499,7 @@ Certificate fingerprints:
|
|||
Signature algorithm name: SHA256withRSA
|
||||
Version: 3
|
||||
|
||||
Extensions:
|
||||
Extensions:
|
||||
|
||||
#1: ObjectId: 2.5.29.35 Criticality=false
|
||||
AuthorityKeyIdentifier [
|
||||
|
@ -791,8 +719,84 @@ ____
|
|||
==== Configuring SNI
|
||||
|
||||
From Java 8, the JVM contains support for the http://en.wikipedia.org/wiki/Server_Name_Indication[Server Name Indicator (SNI)] extension, which allows a SSL connection handshake to indicate one or more DNS names that it applies to.
|
||||
To support this, the `ExtendedSslContextFactory` is used that will look for multiple X509 certificates within the keystore, each of which may have multiple DNS names (including wildcards) associated with the http://en.wikipedia.org/wiki/SubjectAltName[Subject Alternate Name] extension.
|
||||
When using the `ExtendedSSlContextFactory`, the correct certificate is automatically selected if the SNI extension is present in the handshake.
|
||||
|
||||
To support this, the `SslContextFactory` is used.
|
||||
The `SslContextFactory` will look for multiple X509 certificates within the keystore, each of which may have multiple DNS names (including wildcards) associated with the http://en.wikipedia.org/wiki/SubjectAltName[Subject Alternate Name] extension.
|
||||
When using the `SslContextFactory`, the correct certificate is automatically selected if the SNI extension is present in the handshake.
|
||||
|
||||
|
||||
==== Configuring SSL in Jetty Distribution
|
||||
|
||||
For those of you using the Jetty Distribution, enabling SSL support is as easy as activating the `ssl` module.
|
||||
|
||||
An example of this setup:
|
||||
|
||||
[source, plain, subs="{sub-order}"]
|
||||
----
|
||||
$ cd /path/to/mybase
|
||||
$ java -jar /path/to/jetty-dist/start.jar --add-to-startd=ssl
|
||||
INFO : server initialised (transitively) in ${jetty.base}/start.d/server.ini
|
||||
INFO : ssl initialised in ${jetty.base}/start.d/ssl.ini
|
||||
INFO : Base directory was modified
|
||||
$ tree
|
||||
.
|
||||
├── etc
|
||||
│ └── keystore
|
||||
└── start.d
|
||||
├── server.ini
|
||||
└── ssl.ini
|
||||
----
|
||||
|
||||
When you open `start.d/ssl.ini`, you will see several commented properties ready for use when configuring `SslContextFactory` basics.
|
||||
|
||||
To highlight some of the more commonly used properties:
|
||||
|
||||
jetty.ssl.host::
|
||||
Configures which interfaces the SSL/TLS Connector should listen on.
|
||||
jetty.ssl.port::
|
||||
Configures which port the SSL/TLS Connector should listen on.
|
||||
jetty.httpConfig.securePort::
|
||||
If a webapp needs to redirect to a secure version of the same resource, then this is the port reported back on the response `location` line (having this be separate is useful if you have something sitting in front of Jetty, such as a Load Balancer or proxy).
|
||||
jetty.sslContext.keyStorePath::
|
||||
Sets the location of the `keystore` that you configured with your certificates.
|
||||
jetty.sslContext.keyStorePassword::
|
||||
Sets the Password for the `keystore`.
|
||||
|
||||
[[two-way-authentication]]
|
||||
==== Two Way Authentication
|
||||
|
||||
To enable two-way authentication in the Jetty Distribution, you need to enable the both the `ssl` and `https` modules.
|
||||
|
||||
[source, plain, subs="{sub-order}"]
|
||||
----
|
||||
$ cd /path/to/mybase
|
||||
$ java -jar /path/to/jetty-dist/start.jar --add-to-startd=ssl,https
|
||||
----
|
||||
|
||||
[source%nowrap,ini,linenums]
|
||||
.$JETTY_BASE/start.d/ssl.ini
|
||||
----
|
||||
# Module: ssl
|
||||
--module=ssl
|
||||
|
||||
jetty.ssl.host=0.0.0.0
|
||||
jetty.ssl.port=8583
|
||||
jetty.sslContext.keyStorePath=etc/keystore
|
||||
jetty.sslContext.trustStorePath=etc/keystore
|
||||
jetty.sslContext.keyStorePassword=OBF:
|
||||
jetty.sslContext.keyManagerPassword=OBF:
|
||||
jetty.sslContext.trustStorePassword=OBF:
|
||||
jetty.sslContext.trustStoreType=JKS
|
||||
# enable two way authentication
|
||||
jetty.sslContext.needClientAuth=true
|
||||
----
|
||||
|
||||
[source%nowrap,ini,linenums]
|
||||
.$JETTY_BASE/start.d/https.ini
|
||||
----
|
||||
# Module: https
|
||||
--module=https
|
||||
----
|
||||
|
||||
[[configuring-sslcontextfactory-cipherSuites]]
|
||||
==== Disabling/Enabling Specific Cipher Suites
|
||||
|
@ -807,7 +811,7 @@ Tools like ssllabs.com might report slightly different names which will be ignor
|
|||
____
|
||||
|
||||
____
|
||||
[NOTE]
|
||||
[IMPORTANT]
|
||||
It's recommended to install the Java Cryptography Extension (JCE) Unlimited Strength policy files in your JRE to get full strength ciphers such as AES-256.
|
||||
The files can be found on the http://www.oracle.com/technetwork/java/javase/downloads/index.html[Java download page].
|
||||
Just overwrite the two present JAR files in `<JRE_HOME>/lib/security/`.
|
||||
|
@ -815,7 +819,7 @@ ____
|
|||
|
||||
Both `setIncludeCipherSuites` and `setExcludeCipherSuites` can be fed by the exact cipher suite name used in the JDK or by using regular expressions.
|
||||
|
||||
If you have a need to adjust the Includes or Excludes, then this is best done with a custom blow-in XML that configures the `SslContextFactory` to suit your needs.
|
||||
If you have a need to adjust the Includes or Excludes, then this is best done with a custom XML that configures the `SslContextFactory` to suit your needs.
|
||||
|
||||
To do this, first create a new `${jetty.base}/etc/tweak-ssl.xml` file (this can be any name, just avoid prefixing it with "jetty-").
|
||||
|
||||
|
@ -860,7 +864,7 @@ ____
|
|||
[NOTE]
|
||||
The default `SslContextFactory` implementation applies the latest SSL/TLS recommendations surrounding vulnerabilities in SSL/TLS.
|
||||
Check the release notes (the `VERSION.txt` found in the root of the Jetty Distribution, or the http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.eclipse.jetty%22%20AND%20a%3A%22jetty-project%22[alternate (classified 'version') artifacts for the `jetty-project` component]on Maven Central) for updates.
|
||||
The Java JVM is also applying exclusions at the JVM level and as such if you have a need to enable something that is generally accepted by the industry as being insecure or vulnerable you will likely have to enable it in BOTH the Java JVM and the Jetty configuration.
|
||||
The Java JVM also applies exclusions at the JVM level and, as such, if you have a need to enable something that is generally accepted by the industry as being insecure or vulnerable you will likely have to enable it in *both* the Java JVM and your Jetty configuration.
|
||||
____
|
||||
|
||||
____
|
||||
|
@ -930,3 +934,97 @@ ____
|
|||
----
|
||||
<Set name="renegotiationAllowed">FALSE</Set>
|
||||
----
|
||||
|
||||
[[ssl-dump-ciphers]]
|
||||
|
||||
You can view what cipher suites are enabled and disabled by performing a server dump.
|
||||
|
||||
To perform a server dump upon server startup, add `jetty.server.dumpAfterStart=true` to the command line when starting the server.
|
||||
You can also dump the server when shutting down the server instance by adding `jetty.server.dumpBeforeStop`.
|
||||
|
||||
Specifically, you will want to look for the `SslConnectionFactory` portion of the dump.
|
||||
|
||||
[source, screen, subs="{sub-order}"]
|
||||
----
|
||||
[my-base]$ java -jar ${JETTY_HOME}/start.jar jetty.server.dumpAfterStart=true
|
||||
|
||||
...
|
||||
| += SslConnectionFactory@18be83e4{SSL->http/1.1} - STARTED
|
||||
| | += SslContextFactory@42530531(null,null) trustAll=false
|
||||
| | +- Protocol Selections
|
||||
| | | +- Enabled (size=3)
|
||||
| | | | +- TLSv1
|
||||
| | | | +- TLSv1.1
|
||||
| | | | +- TLSv1.2
|
||||
| | | +- Disabled (size=2)
|
||||
| | | +- SSLv2Hello - ConfigExcluded:'SSLv2Hello'
|
||||
| | | +- SSLv3 - JreDisabled:java.security, ConfigExcluded:'SSLv3'
|
||||
| | +- Cipher Suite Selections
|
||||
| | +- Enabled (size=15)
|
||||
| | | +- TLS_DHE_DSS_WITH_AES_128_CBC_SHA256
|
||||
| | | +- TLS_DHE_DSS_WITH_AES_128_GCM_SHA256
|
||||
| | | +- TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
|
||||
| | | +- TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
|
||||
| | | +- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
|
||||
| | | +- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
|
||||
| | | +- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
|
||||
| | | +- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
|
||||
| | | +- TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
|
||||
| | | +- TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
|
||||
| | | +- TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
|
||||
| | | +- TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
|
||||
| | | +- TLS_EMPTY_RENEGOTIATION_INFO_SCSV
|
||||
| | | +- TLS_RSA_WITH_AES_128_CBC_SHA256
|
||||
| | | +- TLS_RSA_WITH_AES_128_GCM_SHA256
|
||||
| | +- Disabled (size=42)
|
||||
| | +- SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA - ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- SSL_DHE_DSS_WITH_DES_CBC_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA - ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- SSL_DHE_RSA_WITH_DES_CBC_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- SSL_DH_anon_WITH_3DES_EDE_CBC_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- SSL_DH_anon_WITH_DES_CBC_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- SSL_RSA_EXPORT_WITH_DES40_CBC_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- SSL_RSA_WITH_3DES_EDE_CBC_SHA - ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- SSL_RSA_WITH_DES_CBC_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- SSL_RSA_WITH_NULL_MD5 - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- SSL_RSA_WITH_NULL_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_DHE_DSS_WITH_AES_128_CBC_SHA - ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_DHE_RSA_WITH_AES_128_CBC_SHA - ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_DH_anon_WITH_AES_128_CBC_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_DH_anon_WITH_AES_128_CBC_SHA256 - JreDisabled:java.security
|
||||
| | +- TLS_DH_anon_WITH_AES_128_GCM_SHA256 - JreDisabled:java.security
|
||||
| | +- TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA - ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA - ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_ECDHE_ECDSA_WITH_NULL_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA - ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_ECDHE_RSA_WITH_NULL_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA - ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA - ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_ECDH_ECDSA_WITH_NULL_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA - ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_ECDH_RSA_WITH_AES_128_CBC_SHA - ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_ECDH_RSA_WITH_NULL_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_ECDH_anon_WITH_AES_128_CBC_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_ECDH_anon_WITH_NULL_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_KRB5_WITH_3DES_EDE_CBC_MD5 - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_KRB5_WITH_3DES_EDE_CBC_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_KRB5_WITH_DES_CBC_MD5 - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_KRB5_WITH_DES_CBC_SHA - JreDisabled:java.security, ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_RSA_WITH_AES_128_CBC_SHA - ConfigExcluded:'^.*_(MD5|SHA|SHA1)$'
|
||||
| | +- TLS_RSA_WITH_NULL_SHA256 - JreDisabled:java.security
|
||||
...
|
||||
----
|
||||
|
||||
In the example above you can see both the enabled/disabled protocols and included/excluded ciper suites.
|
||||
For disabled or excluded protocols and ciphers, the reason they are disabled is given - either due to JVM restrictions, configuration or both.
|
||||
As a reminder, when configuring your includes/excludes, *excludes always win*.
|
||||
|
||||
Dumps can be configured as part of the `jetty.xml` configuration for your server.
|
||||
Please see the documentation on the link:#jetty-dump-tool[Jetty Dump Tool] for more information.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.fcgi</groupId>
|
||||
<artifactId>fcgi-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.fcgi</groupId>
|
||||
<artifactId>fcgi-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.gcloud</groupId>
|
||||
<artifactId>gcloud-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.gcloud</groupId>
|
||||
<artifactId>gcloud-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-hazelcast</artifactId>
|
||||
<name>Jetty :: Hazelcast Session Managers</name>
|
||||
<url>http://www.eclipse.org/jetty</url>
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.groupId}.hazelcast</bundle-symbolic-name>
|
||||
<hazelcast.sessionManager.version>1.0.2</hazelcast.sessionManager.version>
|
||||
<hazelcast.version>3.8.2</hazelcast.version>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>config</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hazelcast</groupId>
|
||||
<artifactId>hazelcast-jetty9-sessionmanager</artifactId>
|
||||
<version>${hazelcast.sessionManager.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hazelcast</groupId>
|
||||
<artifactId>hazelcast-all</artifactId>
|
||||
<version>${hazelcast.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||
|
||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Configure a SessionIdManager with the Hazelcast IdManager. -->
|
||||
<!-- ===================================================================== -->
|
||||
<Set name="sessionIdManager">
|
||||
<New id="hazelcastIdMgr" class="com.hazelcast.session.HazelcastSessionIdManager">
|
||||
<Arg>
|
||||
<Ref refid="Server"/>
|
||||
</Arg>
|
||||
<Set name="configLocation"><Property name="jetty.session.hazelcast.configurationLocation"/></Set>
|
||||
<Set name="clientOnly">false</Set>
|
||||
</New>
|
||||
</Set>
|
||||
|
||||
</Configure>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||
|
||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Configure a SessionIdManager with the Hazelcast IdManager. -->
|
||||
<!-- ===================================================================== -->
|
||||
<Set name="sessionIdManager">
|
||||
<New id="hazelcastIdMgr" class="com.hazelcast.session.HazelcastSessionIdManager">
|
||||
<Arg>
|
||||
<Ref refid="Server"/>
|
||||
</Arg>
|
||||
<Set name="configLocation"><Property name="jetty.session.hazelcast.configurationLocation"/></Set>
|
||||
<Set name="clientOnly">true</Set>
|
||||
</New>
|
||||
</Set>
|
||||
|
||||
</Configure>
|
|
@ -0,0 +1,26 @@
|
|||
#
|
||||
# Jetty Hazelcast module
|
||||
#
|
||||
|
||||
[depend]
|
||||
annotations
|
||||
webapp
|
||||
|
||||
[files]
|
||||
maven://com.hazelcast/hazelcast-all/3.8.2|lib/hazelcast/hazelcast-all-3.8.2.jar
|
||||
maven://com.hazelcast/hazelcast-jetty9-sessionmanager/1.0.2|lib/hazelcast/hazelcast-jetty9-sessionmanager-1.0.2.jar
|
||||
maven://org.eclipse.jetty/jetty-nosql/${jetty.version}|lib/hazelcast/jetty-nosql-${jetty.version}.jar
|
||||
|
||||
[xml]
|
||||
etc/sessions/hazelcast/default.xml
|
||||
|
||||
[lib]
|
||||
lib/hazelcast/*.jar
|
||||
|
||||
[license]
|
||||
Hazelcast is an open source project hosted on Github and released under the Apache 2.0 license.
|
||||
https://hazelcast.org/
|
||||
http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
[ini-template]
|
||||
#jetty.session.hazelcast.configurationLocation=
|
|
@ -0,0 +1,26 @@
|
|||
#
|
||||
# Jetty Hazelcast module
|
||||
#
|
||||
|
||||
[depend]
|
||||
annotations
|
||||
webapp
|
||||
|
||||
[files]
|
||||
maven://com.hazelcast/hazelcast-all/3.8.2|lib/hazelcast/hazelcast-all-3.8.2.jar
|
||||
maven://com.hazelcast/hazelcast-jetty9-sessionmanager/1.0.2|lib/hazelcast/hazelcast-jetty9-sessionmanager-1.0.2.jar
|
||||
maven://org.eclipse.jetty/jetty-nosql/${jetty.version}|lib/hazelcast/jetty-nosql-${jetty.version}.jar
|
||||
|
||||
[xml]
|
||||
etc/sessions/hazelcast/remote.xml
|
||||
|
||||
[lib]
|
||||
lib/hazelcast/*.jar
|
||||
|
||||
[license]
|
||||
Hazelcast is an open source project hosted on Github and released under the Apache 2.0 license.
|
||||
https://hazelcast.org/
|
||||
http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
[ini-template]
|
||||
#jetty.session.hazelcast.configurationLocation=
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-http-spi</artifactId>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-http</artifactId>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.nio.ByteBuffer;
|
|||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletInputStream;
|
||||
|
@ -36,6 +37,7 @@ import org.eclipse.jetty.http.HttpVersion;
|
|||
import org.eclipse.jetty.http.MetaData;
|
||||
import org.eclipse.jetty.http2.FlowControlStrategy;
|
||||
import org.eclipse.jetty.http2.HTTP2Session;
|
||||
import org.eclipse.jetty.http2.ISession;
|
||||
import org.eclipse.jetty.http2.api.Session;
|
||||
import org.eclipse.jetty.http2.api.Stream;
|
||||
import org.eclipse.jetty.http2.api.server.ServerSessionListener;
|
||||
|
@ -43,10 +45,17 @@ import org.eclipse.jetty.http2.frames.DataFrame;
|
|||
import org.eclipse.jetty.http2.frames.GoAwayFrame;
|
||||
import org.eclipse.jetty.http2.frames.HeadersFrame;
|
||||
import org.eclipse.jetty.http2.frames.ResetFrame;
|
||||
import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory;
|
||||
import org.eclipse.jetty.server.HttpConfiguration;
|
||||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.server.ServerConnector;
|
||||
import org.eclipse.jetty.servlet.ServletContextHandler;
|
||||
import org.eclipse.jetty.servlet.ServletHolder;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.FuturePromise;
|
||||
import org.eclipse.jetty.util.Promise;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.thread.QueuedThreadPool;
|
||||
import org.hamcrest.Matchers;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
@ -421,7 +430,7 @@ public class IdleTimeoutTest extends AbstractTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testStreamIdleTimeoutIsNotEnforcedWhenReceiving() throws Exception
|
||||
public void testServerStreamIdleTimeoutIsNotEnforcedWhenReceiving() throws Exception
|
||||
{
|
||||
final CountDownLatch timeoutLatch = new CountDownLatch(1);
|
||||
start(new ServerSessionListener.Adapter()
|
||||
|
@ -465,7 +474,7 @@ public class IdleTimeoutTest extends AbstractTest
|
|||
@Override
|
||||
public void succeeded()
|
||||
{
|
||||
// Idle timeout should not fire while receiving.
|
||||
// Idle timeout should not fire while the server is receiving.
|
||||
Assert.assertEquals(1, timeoutLatch.getCount());
|
||||
dataLatch.countDown();
|
||||
}
|
||||
|
@ -479,7 +488,7 @@ public class IdleTimeoutTest extends AbstractTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testStreamIdleTimeoutIsNotEnforcedWhenSending() throws Exception
|
||||
public void testClientStreamIdleTimeoutIsNotEnforcedWhenSending() throws Exception
|
||||
{
|
||||
final CountDownLatch resetLatch = new CountDownLatch(1);
|
||||
start(new ServerSessionListener.Adapter()
|
||||
|
@ -575,6 +584,83 @@ public class IdleTimeoutTest extends AbstractTest
|
|||
Assert.assertTrue(latch.await(2 * (contentLength / bufferSize + 1) * delay, TimeUnit.MILLISECONDS));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testServerIdleTimeoutIsEnforcedForQueuedRequest() throws Exception
|
||||
{
|
||||
long idleTimeout = 2000;
|
||||
// Use a small thread pool to cause request queueing.
|
||||
QueuedThreadPool serverExecutor = new QueuedThreadPool(4);
|
||||
serverExecutor.setName("server");
|
||||
server = new Server(serverExecutor);
|
||||
HTTP2ServerConnectionFactory h2 = new HTTP2ServerConnectionFactory(new HttpConfiguration());
|
||||
h2.setInitialSessionRecvWindow(FlowControlStrategy.DEFAULT_WINDOW_SIZE);
|
||||
h2.setInitialStreamRecvWindow(FlowControlStrategy.DEFAULT_WINDOW_SIZE);
|
||||
h2.setStreamIdleTimeout(idleTimeout);
|
||||
connector = new ServerConnector(server, 1, 1, h2);
|
||||
connector.setIdleTimeout(10 * idleTimeout);
|
||||
server.addConnector(connector);
|
||||
ServletContextHandler context = new ServletContextHandler(server, "/", true, false);
|
||||
AtomicReference<CountDownLatch> phaser = new AtomicReference<>();
|
||||
context.addServlet(new ServletHolder(new HttpServlet()
|
||||
{
|
||||
@Override
|
||||
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
|
||||
{
|
||||
phaser.get().countDown();
|
||||
|
||||
// Hold the dispatched requests enough for the idle requests to idle timeout.
|
||||
sleep(2 * idleTimeout);
|
||||
}
|
||||
}), servletPath + "/*");
|
||||
server.start();
|
||||
|
||||
prepareClient();
|
||||
client.start();
|
||||
|
||||
Session client = newClient(new Session.Listener.Adapter());
|
||||
|
||||
// Send requests until one is queued on the server but not dispatched.
|
||||
while (true)
|
||||
{
|
||||
phaser.set(new CountDownLatch(1));
|
||||
|
||||
MetaData.Request request = newRequest("GET", new HttpFields());
|
||||
HeadersFrame frame = new HeadersFrame(request, null, false);
|
||||
FuturePromise<Stream> promise = new FuturePromise<>();
|
||||
client.newStream(frame, promise, new Stream.Listener.Adapter());
|
||||
Stream stream = promise.get(5, TimeUnit.SECONDS);
|
||||
ByteBuffer data = ByteBuffer.allocate(10);
|
||||
stream.data(new DataFrame(stream.getId(), data, true), Callback.NOOP);
|
||||
|
||||
if (!phaser.get().await(1, TimeUnit.SECONDS))
|
||||
break;
|
||||
}
|
||||
|
||||
// Send one more request to consume the whole session flow control window.
|
||||
CountDownLatch resetLatch = new CountDownLatch(1);
|
||||
MetaData.Request request = newRequest("GET", new HttpFields());
|
||||
HeadersFrame frame = new HeadersFrame(request, null, false);
|
||||
FuturePromise<Stream> promise = new FuturePromise<>();
|
||||
client.newStream(frame, promise, new Stream.Listener.Adapter()
|
||||
{
|
||||
@Override
|
||||
public void onReset(Stream stream, ResetFrame frame)
|
||||
{
|
||||
resetLatch.countDown();
|
||||
}
|
||||
});
|
||||
Stream stream = promise.get(5, TimeUnit.SECONDS);
|
||||
ByteBuffer data = ByteBuffer.allocate(((ISession)client).updateSendWindow(0));
|
||||
stream.data(new DataFrame(stream.getId(), data, true), Callback.NOOP);
|
||||
|
||||
Assert.assertTrue(resetLatch.await(2 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
|
||||
// Wait for WINDOW_UPDATEs to be processed by the client.
|
||||
sleep(1000);
|
||||
|
||||
Assert.assertThat(((ISession)client).updateSendWindow(0), Matchers.greaterThan(0));
|
||||
}
|
||||
|
||||
private void sleep(long value)
|
||||
{
|
||||
try
|
||||
|
|
|
@ -24,7 +24,9 @@ import java.nio.ByteBuffer;
|
|||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Deque;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
@ -39,6 +41,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.eclipse.jetty.http.HttpFields;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.http.HttpVersion;
|
||||
import org.eclipse.jetty.http.MetaData;
|
||||
import org.eclipse.jetty.http2.ErrorCode;
|
||||
|
@ -50,12 +53,22 @@ import org.eclipse.jetty.http2.api.server.ServerSessionListener;
|
|||
import org.eclipse.jetty.http2.frames.DataFrame;
|
||||
import org.eclipse.jetty.http2.frames.HeadersFrame;
|
||||
import org.eclipse.jetty.http2.frames.ResetFrame;
|
||||
import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory;
|
||||
import org.eclipse.jetty.server.HttpConfiguration;
|
||||
import org.eclipse.jetty.server.HttpOutput;
|
||||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.server.ServerConnector;
|
||||
import org.eclipse.jetty.servlet.ServletContextHandler;
|
||||
import org.eclipse.jetty.servlet.ServletHandler;
|
||||
import org.eclipse.jetty.servlet.ServletHolder;
|
||||
import org.eclipse.jetty.util.BufferUtil;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.FutureCallback;
|
||||
import org.eclipse.jetty.util.FuturePromise;
|
||||
import org.eclipse.jetty.util.IO;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.StacklessLogging;
|
||||
import org.eclipse.jetty.util.thread.QueuedThreadPool;
|
||||
import org.hamcrest.Matchers;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
@ -396,6 +409,105 @@ public class StreamResetTest extends AbstractTest
|
|||
Assert.assertThat(((ISession)client).updateSendWindow(0), Matchers.greaterThan(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testClientResetConsumesQueuedRequestWithData() throws Exception
|
||||
{
|
||||
// Use a small thread pool.
|
||||
QueuedThreadPool serverExecutor = new QueuedThreadPool(4);
|
||||
serverExecutor.setName("server");
|
||||
server = new Server(serverExecutor);
|
||||
HTTP2ServerConnectionFactory h2 = new HTTP2ServerConnectionFactory(new HttpConfiguration());
|
||||
h2.setInitialSessionRecvWindow(FlowControlStrategy.DEFAULT_WINDOW_SIZE);
|
||||
h2.setInitialStreamRecvWindow(FlowControlStrategy.DEFAULT_WINDOW_SIZE);
|
||||
connector = new ServerConnector(server, 1, 1, h2);
|
||||
server.addConnector(connector);
|
||||
ServletContextHandler context = new ServletContextHandler(server, "/");
|
||||
AtomicReference<CountDownLatch> phaser = new AtomicReference<>();
|
||||
context.addServlet(new ServletHolder(new HttpServlet()
|
||||
{
|
||||
@Override
|
||||
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
|
||||
{
|
||||
Log.getLogger(StreamResetTest.class).info("SIMON: uri={}", request.getRequestURI());
|
||||
phaser.get().countDown();
|
||||
IO.copy(request.getInputStream(), response.getOutputStream());
|
||||
}
|
||||
}), servletPath + "/*");
|
||||
server.start();
|
||||
|
||||
prepareClient();
|
||||
client.start();
|
||||
|
||||
Session client = newClient(new Session.Listener.Adapter());
|
||||
|
||||
// Send requests until one is queued on the server but not dispatched.
|
||||
AtomicReference<CountDownLatch> latch = new AtomicReference<>();
|
||||
List<Stream> streams = new ArrayList<>();
|
||||
while (true)
|
||||
{
|
||||
phaser.set(new CountDownLatch(1));
|
||||
|
||||
MetaData.Request request = newRequest("GET", new HttpFields());
|
||||
HeadersFrame frame = new HeadersFrame(request, null, false);
|
||||
FuturePromise<Stream> promise = new FuturePromise<>();
|
||||
client.newStream(frame, promise, new Stream.Listener.Adapter()
|
||||
{
|
||||
@Override
|
||||
public void onHeaders(Stream stream, HeadersFrame frame)
|
||||
{
|
||||
Log.getLogger(StreamResetTest.class).info("SIMON: response={}/{}", stream.getId(), frame.getMetaData());
|
||||
MetaData.Response response = (MetaData.Response)frame.getMetaData();
|
||||
if (response.getStatus() == HttpStatus.OK_200)
|
||||
latch.get().countDown();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onData(Stream stream, DataFrame frame, Callback callback)
|
||||
{
|
||||
Log.getLogger(StreamResetTest.class).info("SIMON: data={}/{}", stream.getId(), frame);
|
||||
callback.succeeded();
|
||||
if (frame.isEndStream())
|
||||
latch.get().countDown();
|
||||
}
|
||||
});
|
||||
Stream stream = promise.get(5, TimeUnit.SECONDS);
|
||||
streams.add(stream);
|
||||
ByteBuffer data = ByteBuffer.allocate(10);
|
||||
stream.data(new DataFrame(stream.getId(), data, false), Callback.NOOP);
|
||||
|
||||
if (!phaser.get().await(1, TimeUnit.SECONDS))
|
||||
break;
|
||||
}
|
||||
|
||||
// Send one more request to consume the whole session flow control window, then reset it.
|
||||
MetaData.Request request = newRequest("GET", "/x", new HttpFields());
|
||||
HeadersFrame frame = new HeadersFrame(request, null, false);
|
||||
FuturePromise<Stream> promise = new FuturePromise<>();
|
||||
// This request will get no event from the server since it's reset by the client.
|
||||
client.newStream(frame, promise, new Stream.Listener.Adapter());
|
||||
Stream stream = promise.get(5, TimeUnit.SECONDS);
|
||||
ByteBuffer data = ByteBuffer.allocate(((ISession)client).updateSendWindow(0));
|
||||
stream.data(new DataFrame(stream.getId(), data, false), new Callback()
|
||||
{
|
||||
@Override
|
||||
public void succeeded()
|
||||
{
|
||||
stream.reset(new ResetFrame(stream.getId(), ErrorCode.CANCEL_STREAM_ERROR.code), NOOP);
|
||||
}
|
||||
});
|
||||
|
||||
// Wait for WINDOW_UPDATEs to be processed by the client.
|
||||
Thread.sleep(1000);
|
||||
|
||||
Assert.assertThat(((ISession)client).updateSendWindow(0), Matchers.greaterThan(0));
|
||||
|
||||
latch.set(new CountDownLatch(2 * streams.size()));
|
||||
// Complete all streams.
|
||||
streams.forEach(s -> s.data(new DataFrame(s.getId(), BufferUtil.EMPTY_BUFFER, true), Callback.NOOP));
|
||||
|
||||
Assert.assertTrue(latch.get().await(5, TimeUnit.SECONDS));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testServerExceptionConsumesQueuedData() throws Exception
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -51,7 +51,7 @@ public class HttpSenderOverHTTP2 extends HttpSender
|
|||
{
|
||||
Request request = exchange.getRequest();
|
||||
String path = relativize(request.getPath());
|
||||
HttpURI uri = new HttpURI(request.getScheme(), request.getHost(), request.getPort(), path, null, request.getQuery(), null);
|
||||
HttpURI uri = HttpURI.createHttpURI(request.getScheme(), request.getHost(), request.getPort(), path, null, request.getQuery(), null);
|
||||
MetaData.Request metaData = new MetaData.Request(request.getMethod(), uri, HttpVersion.HTTP_2, request.getHeaders());
|
||||
HeadersFrame headersFrame = new HeadersFrame(metaData, null, !content.hasContent());
|
||||
HttpChannelOverHTTP2 channel = getHttpChannel();
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-parent</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package org.eclipse.jetty.http2.server;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
|
@ -146,6 +147,10 @@ public class HTTP2ServerConnection extends HTTP2Connection implements Connection
|
|||
if (task != null)
|
||||
offerTask(task, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
callback.failed(new IOException("channel_not_found"));
|
||||
}
|
||||
}
|
||||
|
||||
public boolean onStreamTimeout(IStream stream, Throwable failure)
|
||||
|
@ -174,7 +179,7 @@ public class HTTP2ServerConnection extends HTTP2Connection implements Connection
|
|||
{
|
||||
HttpChannelOverHTTP2 channel = (HttpChannelOverHTTP2)stream.getAttribute(IStream.CHANNEL_ATTRIBUTE);
|
||||
if (channel != null)
|
||||
result &= !channel.isRequestHandled();
|
||||
result &= !channel.isRequestExecuting();
|
||||
}
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} idle timeout on {}: {}", result ? "Processed" : "Ignored", session, failure);
|
||||
|
|
|
@ -53,7 +53,6 @@ public class HttpChannelOverHTTP2 extends HttpChannel
|
|||
|
||||
private boolean _expect100Continue;
|
||||
private boolean _delayedUntilContent;
|
||||
private boolean _handled;
|
||||
|
||||
public HttpChannelOverHTTP2(Connector connector, HttpConfiguration configuration, EndPoint endPoint, HttpTransportOverHTTP2 transport)
|
||||
{
|
||||
|
@ -121,7 +120,6 @@ public class HttpChannelOverHTTP2 extends HttpChannel
|
|||
|
||||
_delayedUntilContent = getHttpConfiguration().isDelayDispatchUntilContent() &&
|
||||
!endStream && !_expect100Continue;
|
||||
_handled = !_delayedUntilContent;
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
{
|
||||
|
@ -190,7 +188,6 @@ public class HttpChannelOverHTTP2 extends HttpChannel
|
|||
{
|
||||
_expect100Continue = false;
|
||||
_delayedUntilContent = false;
|
||||
_handled = false;
|
||||
super.recycle();
|
||||
getHttpTransport().recycle();
|
||||
}
|
||||
|
@ -277,38 +274,35 @@ public class HttpChannelOverHTTP2 extends HttpChannel
|
|||
|
||||
boolean wasDelayed = _delayedUntilContent;
|
||||
_delayedUntilContent = false;
|
||||
if (wasDelayed)
|
||||
_handled = true;
|
||||
return handle || wasDelayed ? this : null;
|
||||
}
|
||||
|
||||
public boolean isRequestHandled()
|
||||
public boolean isRequestExecuting()
|
||||
{
|
||||
return _handled;
|
||||
return !getState().isIdle();
|
||||
}
|
||||
|
||||
public boolean onStreamTimeout(Throwable failure)
|
||||
{
|
||||
if (!_handled)
|
||||
return true;
|
||||
|
||||
HttpInput input = getRequest().getHttpInput();
|
||||
boolean readFailed = input.failed(failure);
|
||||
if (readFailed)
|
||||
getHttpTransport().onStreamTimeout(failure);
|
||||
if (getRequest().getHttpInput().onIdleTimeout(failure))
|
||||
handle();
|
||||
|
||||
boolean writeFailed = getHttpTransport().onStreamTimeout(failure);
|
||||
if (isRequestExecuting())
|
||||
return false;
|
||||
|
||||
return readFailed || writeFailed;
|
||||
consumeInput();
|
||||
return true;
|
||||
}
|
||||
|
||||
public void onFailure(Throwable failure)
|
||||
{
|
||||
getHttpTransport().onStreamFailure(failure);
|
||||
if (onEarlyEOF())
|
||||
if (getRequest().getHttpInput().failed(failure))
|
||||
handle();
|
||||
else
|
||||
getState().asyncError(failure);
|
||||
consumeInput();
|
||||
}
|
||||
|
||||
protected void consumeInput()
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-infinispan</artifactId>
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
package org.eclipse.jetty.session.infinispan;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectStreamException;
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
@ -41,9 +40,7 @@ import org.eclipse.jetty.util.log.Log;
|
|||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.thread.ScheduledExecutorScheduler;
|
||||
import org.eclipse.jetty.util.thread.Scheduler;
|
||||
import org.infinispan.Cache;
|
||||
import org.infinispan.commons.api.BasicCache;
|
||||
import org.omg.CORBA._IDLTypeStub;
|
||||
|
||||
/**
|
||||
* InfinispanSessionManager
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-io</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jaas</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jaspi</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jmx</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jndi</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jspc-maven-plugin</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-monitor</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-nosql</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-osgi-alpn</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-osgi-boot-jsp</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-osgi-boot</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-httpservice</artifactId>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>test-jetty-osgi-context</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -390,15 +390,6 @@
|
|||
<argLine>-Dmortbay-alpn-boot=${settings.localRepository}/org/mortbay/jetty/alpn/alpn-boot/${alpn.version}/alpn-boot-${alpn.version}.jar</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.servicemix.tooling</groupId>
|
||||
<artifactId>depends-maven-plugin</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-plus</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-proxy</artifactId>
|
||||
|
|
|
@ -626,35 +626,14 @@ public abstract class AbstractProxyServlet extends HttpServlet
|
|||
if (_log.isDebugEnabled())
|
||||
_log.debug(getRequestId(clientRequest) + " proxying failed", failure);
|
||||
|
||||
if (proxyResponse.isCommitted())
|
||||
{
|
||||
try
|
||||
{
|
||||
// Use Jetty specific behavior to close connection.
|
||||
proxyResponse.sendError(-1);
|
||||
if (clientRequest.isAsyncStarted())
|
||||
{
|
||||
AsyncContext asyncContext = clientRequest.getAsyncContext();
|
||||
asyncContext.complete();
|
||||
}
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
if (_log.isDebugEnabled())
|
||||
_log.debug(getRequestId(clientRequest) + " could not close the connection", failure);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
proxyResponse.resetBuffer();
|
||||
int status = failure instanceof TimeoutException ?
|
||||
HttpStatus.GATEWAY_TIMEOUT_504 :
|
||||
HttpStatus.BAD_GATEWAY_502;
|
||||
int serverStatus = serverResponse == null ? status : serverResponse.getStatus();
|
||||
if (expects100Continue(clientRequest) && serverStatus >= HttpStatus.OK_200)
|
||||
status = serverStatus;
|
||||
sendProxyResponseError(clientRequest, proxyResponse, status);
|
||||
}
|
||||
int status = failure instanceof TimeoutException ?
|
||||
HttpStatus.GATEWAY_TIMEOUT_504 :
|
||||
HttpStatus.BAD_GATEWAY_502;
|
||||
int serverStatus = serverResponse == null ? status : serverResponse.getStatus();
|
||||
if (expects100Continue(clientRequest) && serverStatus >= HttpStatus.OK_200)
|
||||
status = serverStatus;
|
||||
sendProxyResponseError(clientRequest, proxyResponse, status);
|
||||
|
||||
}
|
||||
|
||||
protected int getRequestId(HttpServletRequest clientRequest)
|
||||
|
@ -664,10 +643,24 @@ public abstract class AbstractProxyServlet extends HttpServlet
|
|||
|
||||
protected void sendProxyResponseError(HttpServletRequest clientRequest, HttpServletResponse proxyResponse, int status)
|
||||
{
|
||||
proxyResponse.setStatus(status);
|
||||
proxyResponse.setHeader(HttpHeader.CONNECTION.asString(), HttpHeaderValue.CLOSE.asString());
|
||||
if (clientRequest.isAsyncStarted())
|
||||
clientRequest.getAsyncContext().complete();
|
||||
try
|
||||
{
|
||||
if (!proxyResponse.isCommitted())
|
||||
{
|
||||
proxyResponse.resetBuffer();
|
||||
proxyResponse.setHeader(HttpHeader.CONNECTION.asString(), HttpHeaderValue.CLOSE.asString());
|
||||
}
|
||||
proxyResponse.sendError(status);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
_log.ignore(e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (clientRequest.isAsyncStarted())
|
||||
clientRequest.getAsyncContext().complete();
|
||||
}
|
||||
}
|
||||
|
||||
protected void onContinue(HttpServletRequest clientRequest, Request proxyRequest)
|
||||
|
|
|
@ -139,16 +139,7 @@ public class AsyncMiddleManServlet extends AbstractProxyServlet
|
|||
|
||||
protected DeferredContentProvider newProxyContentProvider(final HttpServletRequest clientRequest, HttpServletResponse proxyResponse, Request proxyRequest) throws IOException
|
||||
{
|
||||
return new DeferredContentProvider()
|
||||
{
|
||||
@Override
|
||||
public boolean offer(ByteBuffer buffer, Callback callback)
|
||||
{
|
||||
if (_log.isDebugEnabled())
|
||||
_log.debug("{} proxying content to upstream: {} bytes", getRequestId(clientRequest), buffer.remaining());
|
||||
return super.offer(buffer, callback);
|
||||
}
|
||||
};
|
||||
return new ProxyDeferredContentProvider(clientRequest);
|
||||
}
|
||||
|
||||
protected ReadListener newProxyReadListener(HttpServletRequest clientRequest, HttpServletResponse proxyResponse, Request proxyRequest, DeferredContentProvider provider)
|
||||
|
@ -823,4 +814,22 @@ public class AsyncMiddleManServlet extends AbstractProxyServlet
|
|||
return ByteBuffer.wrap(gzipBytes);
|
||||
}
|
||||
}
|
||||
|
||||
private class ProxyDeferredContentProvider extends DeferredContentProvider
|
||||
{
|
||||
private final HttpServletRequest clientRequest;
|
||||
|
||||
public ProxyDeferredContentProvider(HttpServletRequest clientRequest)
|
||||
{
|
||||
this.clientRequest = clientRequest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean offer(ByteBuffer buffer, Callback callback)
|
||||
{
|
||||
if (_log.isDebugEnabled())
|
||||
_log.debug("{} proxying content to upstream: {} bytes", getRequestId(clientRequest), buffer.remaining());
|
||||
return super.offer(buffer, callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1074,10 +1074,10 @@ public class ProxyServletTest
|
|||
Response response = listener.get(5, TimeUnit.SECONDS);
|
||||
Assert.assertEquals(504, response.getStatus());
|
||||
|
||||
// Make sure there is no content, as the proxy-to-client response has been reset.
|
||||
// Make sure there is error page content, as the proxy-to-client response has been reset.
|
||||
InputStream input = listener.getInputStream();
|
||||
Assert.assertEquals(-1, input.read());
|
||||
|
||||
String body = IO.toString(input);
|
||||
Assert.assertThat(body,Matchers.containsString("HTTP ERROR: 504"));
|
||||
chunk1Latch.countDown();
|
||||
|
||||
// Result succeeds because a 504 is a valid HTTP response.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-rewrite</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-runner</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-security</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.3.20-SNAPSHOT</version>
|
||||
<version>9.3.22-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
|
|
|
@ -100,7 +100,11 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor
|
|||
_requestLog = connector == null ? null : connector.getServer().getRequestLog();
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("new {} -> {},{},{}",this,_endPoint,_endPoint.getConnection(),_state);
|
||||
LOG.debug("new {} -> {},{},{}",
|
||||
this,
|
||||
_endPoint,
|
||||
_endPoint==null?null:_endPoint.getConnection(),
|
||||
_state);
|
||||
}
|
||||
|
||||
protected HttpInput newHttpInput(HttpChannelState state)
|
||||
|
@ -257,10 +261,19 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor
|
|||
_written=0;
|
||||
}
|
||||
|
||||
public void asyncReadFillInterested()
|
||||
public void onAsyncWaitForContent()
|
||||
{
|
||||
}
|
||||
|
||||
public void onBlockWaitForContent()
|
||||
{
|
||||
}
|
||||
|
||||
public void onBlockWaitForContentFailure(Throwable failure)
|
||||
{
|
||||
getRequest().getHttpInput().failed(failure);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -372,7 +385,7 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor
|
|||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Could not perform Error Dispatch because the response is already committed, aborting");
|
||||
_transport.abort(ex);
|
||||
abort(ex);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -858,14 +871,14 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor
|
|||
@Override
|
||||
public void failed(Throwable th)
|
||||
{
|
||||
_transport.abort(x);
|
||||
abort(x);
|
||||
super.failed(x);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
_transport.abort(x);
|
||||
abort(x);
|
||||
super.failed(x);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -239,11 +239,23 @@ public class HttpChannelOverHttp extends HttpChannel implements HttpParser.Reque
|
|||
return handle;
|
||||
}
|
||||
|
||||
public void asyncReadFillInterested()
|
||||
public void onAsyncWaitForContent()
|
||||
{
|
||||
_httpConnection.asyncReadFillInterested();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockWaitForContent()
|
||||
{
|
||||
_httpConnection.blockingReadFillInterested();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockWaitForContentFailure(Throwable failure)
|
||||
{
|
||||
_httpConnection.blockingReadFailure(failure);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void badMessage(int status, String reason)
|
||||
{
|
||||
|
|
|
@ -479,7 +479,7 @@ public class HttpChannelState
|
|||
}
|
||||
|
||||
if (read_interested)
|
||||
_channel.asyncReadFillInterested();
|
||||
_channel.onAsyncWaitForContent();
|
||||
|
||||
return action;
|
||||
}
|
||||
|
@ -974,8 +974,8 @@ public class HttpChannelState
|
|||
/* ------------------------------------------------------------ */
|
||||
/** Called to signal async read isReady() has returned false.
|
||||
* This indicates that there is no content available to be consumed
|
||||
* and that once the channel enteres the ASYNC_WAIT state it will
|
||||
* register for read interest by calling {@link HttpChannel#asyncReadFillInterested()}
|
||||
* and that once the channel enters the ASYNC_WAIT state it will
|
||||
* register for read interest by calling {@link HttpChannel#onAsyncWaitForContent()}
|
||||
* either from this method or from a subsequent call to {@link #unhandle()}.
|
||||
*/
|
||||
public void onReadUnready()
|
||||
|
@ -998,7 +998,7 @@ public class HttpChannelState
|
|||
}
|
||||
|
||||
if (interested)
|
||||
_channel.asyncReadFillInterested();
|
||||
_channel.onAsyncWaitForContent();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue