You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/09/05 11:50:40 UTC
[tomcat] 02/03: Remove duplicate definition of initial window size
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 2af43631faeebc13202f87081dbe75ea276371d0
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Sep 4 22:10:21 2019 +0100
Remove duplicate definition of initial window size
---
java/org/apache/coyote/http2/ConnectionSettingsBase.java | 2 +-
java/org/apache/coyote/http2/Http2Protocol.java | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/java/org/apache/coyote/http2/ConnectionSettingsBase.java b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
index 3cf2d8d..515219e 100644
--- a/java/org/apache/coyote/http2/ConnectionSettingsBase.java
+++ b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
@@ -37,7 +37,7 @@ abstract class ConnectionSettingsBase<T extends Throwable> {
static final long UNLIMITED = ((long)1 << 32); // Use the maximum possible
static final int MAX_HEADER_TABLE_SIZE = 1 << 16;
- // Defaults
+ // Defaults (defined by the specification)
static final int DEFAULT_HEADER_TABLE_SIZE = Hpack.DEFAULT_TABLE_SIZE;
static final boolean DEFAULT_ENABLE_PUSH = true;
static final long DEFAULT_MAX_CONCURRENT_STREAMS = UNLIMITED;
diff --git a/java/org/apache/coyote/http2/Http2Protocol.java b/java/org/apache/coyote/http2/Http2Protocol.java
index 6232f35..9597b79 100644
--- a/java/org/apache/coyote/http2/Http2Protocol.java
+++ b/java/org/apache/coyote/http2/Http2Protocol.java
@@ -51,8 +51,6 @@ public class Http2Protocol implements UpgradeProtocol {
// Maximum amount of streams which can be concurrently executed over
// a single connection
static final int DEFAULT_MAX_CONCURRENT_STREAM_EXECUTION = 20;
- // This default is defined by the HTTP/2 specification
- static final int DEFAULT_INITIAL_WINDOW_SIZE = (1 << 16) - 1;
static final int DEFAULT_OVERHEAD_COUNT_FACTOR = 1;
static final int DEFAULT_OVERHEAD_CONTINUATION_THRESHOLD = 1024;
@@ -74,9 +72,9 @@ public class Http2Protocol implements UpgradeProtocol {
private long maxConcurrentStreams = DEFAULT_MAX_CONCURRENT_STREAMS;
private int maxConcurrentStreamExecution = DEFAULT_MAX_CONCURRENT_STREAM_EXECUTION;
- // If a lower initial value is required, set it here but DO NOT change the
- // default defined above.
- private int initialWindowSize = DEFAULT_INITIAL_WINDOW_SIZE;
+ // To advertise a different default to the client specify it here but DO NOT
+ // change the default defined in ConnectionSettingsBase.
+ private int initialWindowSize = ConnectionSettingsBase.DEFAULT_INITIAL_WINDOW_SIZE;
// Limits
private Set<String> allowedTrailerHeaders =
Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org