This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new d985886  Set the compression on the HTTP/2 protocol
d985886 is described below

commit d985886c0fdfd7ce39b18c8f896845140d1b1853
Author: remm <r...@apache.org>
AuthorDate: Tue May 5 09:00:06 2020 +0200

    Set the compression on the HTTP/2 protocol
---
 test/org/apache/coyote/http2/TestStreamProcessor.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/coyote/http2/TestStreamProcessor.java 
b/test/org/apache/coyote/http2/TestStreamProcessor.java
index a46e1b2..cfa0863 100644
--- a/test/org/apache/coyote/http2/TestStreamProcessor.java
+++ b/test/org/apache/coyote/http2/TestStreamProcessor.java
@@ -37,6 +37,7 @@ import org.apache.catalina.Context;
 import org.apache.catalina.Wrapper;
 import org.apache.catalina.connector.Connector;
 import org.apache.catalina.startup.Tomcat;
+import org.apache.coyote.UpgradeProtocol;
 import org.apache.tomcat.util.compat.JrePlatform;
 import org.apache.tomcat.util.http.FastHttpDateFormat;
 
@@ -241,11 +242,15 @@ public class TestStreamProcessor extends Http2TestBase {
 
         // Enable compression for the LargeServlet
         Connector connector = tomcat.getConnector();
-        Assert.assertTrue(connector.setProperty("compression", "on"));
 
         tomcat.start();
 
         enableHttp2();
+        for (UpgradeProtocol protocol : connector.findUpgradeProtocols()) {
+            if (protocol instanceof Http2Protocol) {
+                ((Http2Protocol) protocol).setCompression("on");
+            }
+        }
         openClientConnection();
         doHttpUpgrade();
         sendClientPreface();


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to