This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 4cb34ddd20c3941ad041ae30c37b9ac17265c390 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 cc4ca57..429cf14 100644 --- a/java/org/apache/coyote/http2/ConnectionSettingsBase.java +++ b/java/org/apache/coyote/http2/ConnectionSettingsBase.java @@ -37,7 +37,7 @@ public abstract class ConnectionSettingsBase<T extends Throwable> { protected static final long UNLIMITED = ((long)1 << 32); // Use the maximum possible protected static final int MAX_HEADER_TABLE_SIZE = 1 << 16; - // Defaults + // Defaults (defined by the specification) protected static final int DEFAULT_HEADER_TABLE_SIZE = Hpack.DEFAULT_TABLE_SIZE; protected static final boolean DEFAULT_ENABLE_PUSH = true; protected 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 e8b9ae3..694d424 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org