You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2017/11/14 16:56:42 UTC
[2/4] httpcomponents-core git commit: Removed 'SettingAckNeeded' H2
config parameter (no longer required for compatibility with Apache HTTPD 2.4)
Removed 'SettingAckNeeded' H2 config parameter (no longer required for compatibility with Apache HTTPD 2.4)
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/190fbc3e
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/190fbc3e
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/190fbc3e
Branch: refs/heads/master
Commit: 190fbc3e78d703e4efc89954c4fae13267f4280d
Parents: e59d926
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Tue Nov 14 14:34:07 2017 +0100
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Tue Nov 14 14:34:07 2017 +0100
----------------------------------------------------------------------
.../apache/hc/core5/http2/config/H2Config.java | 23 +++-----------------
.../nio/AbstractHttp2StreamMultiplexer.java | 3 +--
.../http2/Http2CompatibilityTest.java | 2 --
3 files changed, 4 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/190fbc3e/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/config/H2Config.java
----------------------------------------------------------------------
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/config/H2Config.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/config/H2Config.java
index ce4821f..4bf7f90 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/config/H2Config.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/config/H2Config.java
@@ -48,11 +48,9 @@ public class H2Config {
private final int initialWindowSize;
private final int maxFrameSize;
private final int maxHeaderListSize;
- private final boolean settingAckNeeded;
H2Config(final int headerTableSize, final boolean pushEnabled, final int maxConcurrentStreams,
- final int initialWindowSize, final int maxFrameSize, final int maxHeaderListSize,
- final boolean settingAckNeeded) {
+ final int initialWindowSize, final int maxFrameSize, final int maxHeaderListSize) {
super();
this.headerTableSize = headerTableSize;
this.pushEnabled = pushEnabled;
@@ -60,7 +58,6 @@ public class H2Config {
this.initialWindowSize = initialWindowSize;
this.maxFrameSize = maxFrameSize;
this.maxHeaderListSize = maxHeaderListSize;
- this.settingAckNeeded = settingAckNeeded;
}
public int getHeaderTableSize() {
@@ -87,10 +84,6 @@ public class H2Config {
return maxHeaderListSize;
}
- public boolean isSettingAckNeeded() {
- return settingAckNeeded;
- }
-
@Override
public String toString() {
final StringBuilder builder = new StringBuilder();
@@ -100,7 +93,6 @@ public class H2Config {
.append(", initialWindowSize=").append(this.initialWindowSize)
.append(", maxFrameSize=").append(this.maxFrameSize)
.append(", maxHeaderListSize=").append(this.maxHeaderListSize)
- .append(", settingAckNeeded=").append(this.settingAckNeeded)
.append("]");
return builder.toString();
}
@@ -117,8 +109,7 @@ public class H2Config {
.setMaxConcurrentStreams(config.getMaxConcurrentStreams())
.setInitialWindowSize(config.getInitialWindowSize())
.setMaxFrameSize(config.getMaxFrameSize())
- .setMaxHeaderListSize(config.getMaxHeaderListSize())
- .setSettingAckNeeded(config.isSettingAckNeeded());
+ .setMaxHeaderListSize(config.getMaxHeaderListSize());
}
public static class Builder {
@@ -129,7 +120,6 @@ public class H2Config {
private int initialWindowSize;
private int maxFrameSize;
private int maxHeaderListSize;
- private boolean settingAckNeeded;
Builder() {
this.headerTableSize = 8192;
@@ -138,7 +128,6 @@ public class H2Config {
this.initialWindowSize = 65535;
this.maxFrameSize = FrameConsts.MIN_FRAME_SIZE * 4;
this.maxHeaderListSize = FrameConsts.MAX_FRAME_SIZE;
- this.settingAckNeeded = true;
}
public Builder setHeaderTableSize(final int headerTableSize) {
@@ -176,15 +165,9 @@ public class H2Config {
return this;
}
- public Builder setSettingAckNeeded(final boolean settingAckNeeded) {
- this.settingAckNeeded = settingAckNeeded;
- return this;
- }
-
public H2Config build() {
return new H2Config(
- headerTableSize, pushEnabled, maxConcurrentStreams, initialWindowSize, maxFrameSize, maxHeaderListSize,
- settingAckNeeded);
+ headerTableSize, pushEnabled, maxConcurrentStreams, initialWindowSize, maxFrameSize, maxHeaderListSize);
}
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/190fbc3e/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2StreamMultiplexer.java
----------------------------------------------------------------------
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2StreamMultiplexer.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2StreamMultiplexer.java
index e1044f6..32525ba 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2StreamMultiplexer.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2StreamMultiplexer.java
@@ -485,8 +485,7 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
}
}
- if (connState.compareTo(ConnectionHandshake.ACTIVE) <= 0
- && (remoteSettingState == SettingsHandshake.ACKED || !localConfig.isSettingAckNeeded())) {
+ if (connState.compareTo(ConnectionHandshake.ACTIVE) <= 0 && remoteSettingState == SettingsHandshake.ACKED) {
processPendingCommands();
}
if (connState.compareTo(ConnectionHandshake.GRACEFUL_SHUTDOWN) == 0) {
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/190fbc3e/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/compatibility/http2/Http2CompatibilityTest.java
----------------------------------------------------------------------
diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/compatibility/http2/Http2CompatibilityTest.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/compatibility/http2/Http2CompatibilityTest.java
index 1cd9861..70d42f9 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/compatibility/http2/Http2CompatibilityTest.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/compatibility/http2/Http2CompatibilityTest.java
@@ -78,8 +78,6 @@ public class Http2CompatibilityTest {
case APACHE_HTTPD:
h2Config = H2Config.custom()
.setPushEnabled(true)
- // Required for compatibility with Apache HTTPD 2.4
- .setSettingAckNeeded(false)
.build();
break;
case NGINX: