Author: markt Date: Wed Aug 1 20:27:24 2018 New Revision: 1837259 URL: http://svn.apache.org/viewvc?rev=1837259&view=rev Log: Fix error in back-port of HTTP/2 compression
Modified: tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/Http2Protocol.java tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java tomcat/tc8.5.x/trunk/test/org/apache/coyote/http2/TestAbstractStream.java tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/Http2Protocol.java URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/Http2Protocol.java?rev=1837259&r1=1837258&r2=1837259&view=diff ============================================================================== --- tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/Http2Protocol.java (original) +++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/Http2Protocol.java Wed Aug 1 20:27:24 2018 @@ -106,7 +106,7 @@ public class Http2Protocol implements Up @Override public InternalHttpUpgradeHandler getInternalUpgradeHandler(Adapter adapter, Request coyoteRequest) { - Http2UpgradeHandler result = new Http2UpgradeHandler(adapter, coyoteRequest); + Http2UpgradeHandler result = new Http2UpgradeHandler(this, adapter, coyoteRequest); result.setReadTimeout(getReadTimeout()); result.setKeepAliveTimeout(getKeepAliveTimeout()); Modified: tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java?rev=1837259&r1=1837258&r2=1837259&view=diff ============================================================================== --- tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java (original) +++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Wed Aug 1 20:27:24 2018 @@ -152,6 +152,14 @@ public class Http2UpgradeHandler extends private int maxTrailerSize = Constants.DEFAULT_MAX_TRAILER_SIZE; + /** + * @param adapter The adapter to use to process the upgrade + * @param coyoteRequest The request to use to process the upgrade + * + * @deprecated This will be removed in Tomcat 9 onwards. + * Use {@link #Http2UpgradeHandler(Http2Protocol, Adapter, Request)} + */ + @Deprecated public Http2UpgradeHandler(Adapter adapter, Request coyoteRequest) { this(null, adapter, coyoteRequest); } Modified: tomcat/tc8.5.x/trunk/test/org/apache/coyote/http2/TestAbstractStream.java URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/test/org/apache/coyote/http2/TestAbstractStream.java?rev=1837259&r1=1837258&r2=1837259&view=diff ============================================================================== --- tomcat/tc8.5.x/trunk/test/org/apache/coyote/http2/TestAbstractStream.java (original) +++ tomcat/tc8.5.x/trunk/test/org/apache/coyote/http2/TestAbstractStream.java Wed Aug 1 20:27:24 2018 @@ -28,7 +28,7 @@ public class TestAbstractStream { @Test public void testDependenciesFig3() { // Setup - Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null); + Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null, null); Stream a = new Stream(Integer.valueOf(1), handler); Stream b = new Stream(Integer.valueOf(2), handler); Stream c = new Stream(Integer.valueOf(3), handler); @@ -59,7 +59,7 @@ public class TestAbstractStream { @Test public void testDependenciesFig4() { // Setup - Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null); + Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null, null); Stream a = new Stream(Integer.valueOf(1), handler); Stream b = new Stream(Integer.valueOf(2), handler); Stream c = new Stream(Integer.valueOf(3), handler); @@ -90,7 +90,7 @@ public class TestAbstractStream { @Test public void testDependenciesFig5NonExclusive() { // Setup - Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null); + Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null, null); Stream a = new Stream(Integer.valueOf(1), handler); Stream b = new Stream(Integer.valueOf(2), handler); Stream c = new Stream(Integer.valueOf(3), handler); @@ -132,7 +132,7 @@ public class TestAbstractStream { @Test public void testDependenciesFig5Exclusive() { // Setup - Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null); + Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null, null); Stream a = new Stream(Integer.valueOf(1), handler); Stream b = new Stream(Integer.valueOf(2), handler); Stream c = new Stream(Integer.valueOf(3), handler); @@ -174,7 +174,7 @@ public class TestAbstractStream { @Test public void testCircular01() { // Setup - Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null); + Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null, null); Stream a = new Stream(Integer.valueOf(1), handler); Stream b = new Stream(Integer.valueOf(2), handler); Stream c = new Stream(Integer.valueOf(3), handler); @@ -204,7 +204,7 @@ public class TestAbstractStream { @Test public void testCircular02() { // Setup - Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null); + Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null, null); Stream a = new Stream(Integer.valueOf(1), handler); Stream b = new Stream(Integer.valueOf(2), handler); Stream c = new Stream(Integer.valueOf(3), handler); @@ -250,7 +250,7 @@ public class TestAbstractStream { @Test public void testCircular03() { // Setup - Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null); + Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null, null); Stream a = new Stream(Integer.valueOf(1), handler); Stream b = new Stream(Integer.valueOf(3), handler); Stream c = new Stream(Integer.valueOf(5), handler); Modified: tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml?rev=1837259&r1=1837258&r2=1837259&view=diff ============================================================================== --- tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Wed Aug 1 20:27:24 2018 @@ -94,6 +94,10 @@ <bug>62526</bug>: Correctly handle PKCS12 format key stores when the key store password is configured to be the empty string. (markt) </fix> + <fix> + Fix error in back-port of HTTP/2 compression that meant compression was + never enabled. (markt) + </fix> </changelog> </subsection> <subsection name="Jasper"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org