This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new e79485b Set the compression on the HTTP/2 protocol
e79485b is described below
commit e79485b1214c7dd9b320efdce5740c58e599635e
Author: remm <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]