diff --git a/SECURITY.md b/SECURITY.md
index 81e609b638..1ab534e204 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -62,7 +62,7 @@ In Maven, you can use the [os-maven-plugin](https://github.com/trustin/os-maven-
io.netty
netty-tcnative-boringssl-static
- 1.1.33.Fork25
+ 1.1.33.Fork26
@@ -80,7 +80,7 @@ buildscript {
}
dependencies {
- compile 'io.netty:netty-tcnative-boringssl-static:1.1.33.Fork25'
+ compile 'io.netty:netty-tcnative-boringssl-static:1.1.33.Fork26'
}
```
@@ -115,7 +115,7 @@ In Maven, you can use the [os-maven-plugin](https://github.com/trustin/os-maven-
io.netty
netty-tcnative
- 1.1.33.Fork25
+ 1.1.33.Fork26
${tcnative.classifier}
@@ -183,7 +183,7 @@ if (osdetector.os == "linux" && osdetector.release.isLike("fedora")) {
}
dependencies {
- compile 'io.netty:netty-tcnative:1.1.33.Fork25:' + tcnative_classifier
+ compile 'io.netty:netty-tcnative:1.1.33.Fork26:' + tcnative_classifier
}
```
diff --git a/build.gradle b/build.gradle
index c15fe3d861..683ad75935 100644
--- a/build.gradle
+++ b/build.gradle
@@ -161,10 +161,10 @@ subprojects {
protobuf_plugin: 'com.google.protobuf:protobuf-gradle-plugin:0.8.0',
protobuf_util: "com.google.protobuf:protobuf-java-util:${protobufVersion}",
- netty: 'io.netty:netty-codec-http2:[4.1.7.Final]',
- netty_epoll: 'io.netty:netty-transport-native-epoll:4.1.7.Final' + epoll_suffix,
- netty_proxy_handler: 'io.netty:netty-handler-proxy:4.1.7.Final',
- netty_tcnative: 'io.netty:netty-tcnative-boringssl-static:1.1.33.Fork25',
+ netty: 'io.netty:netty-codec-http2:[4.1.8.Final]',
+ netty_epoll: 'io.netty:netty-transport-native-epoll:4.1.8.Final' + epoll_suffix,
+ netty_proxy_handler: 'io.netty:netty-handler-proxy:4.1.8.Final',
+ netty_tcnative: 'io.netty:netty-tcnative-boringssl-static:1.1.33.Fork26',
// Test dependencies.
junit: 'junit:junit:4.11',
diff --git a/netty/src/main/java/io/grpc/netty/GrpcHttp2HeadersDecoder.java b/netty/src/main/java/io/grpc/netty/GrpcHttp2HeadersDecoder.java
index e910bf38df..e3183d1e74 100644
--- a/netty/src/main/java/io/grpc/netty/GrpcHttp2HeadersDecoder.java
+++ b/netty/src/main/java/io/grpc/netty/GrpcHttp2HeadersDecoder.java
@@ -58,7 +58,6 @@ import io.grpc.Metadata;
import io.netty.buffer.ByteBuf;
import io.netty.handler.codec.http2.DefaultHttp2HeadersDecoder;
import io.netty.handler.codec.http2.Http2Exception;
-import io.netty.handler.codec.http2.Http2HeaderTable;
import io.netty.handler.codec.http2.Http2Headers;
import io.netty.handler.codec.http2.Http2HeadersDecoder;
import io.netty.handler.codec.http2.internal.hpack.Decoder;
@@ -79,21 +78,11 @@ abstract class GrpcHttp2HeadersDecoder implements Http2HeadersDecoder,
private static final float HEADERS_COUNT_WEIGHT_NEW = 1 / 5f;
private static final float HEADERS_COUNT_WEIGHT_HISTORICAL = 1 - HEADERS_COUNT_WEIGHT_NEW;
- private final Decoder decoder = new Decoder();
- private final Http2HeaderTable headerTable = new GrpcHttp2HeaderTable();
+ private final Decoder decoder;
private float numHeadersGuess = 8;
GrpcHttp2HeadersDecoder(long maxHeaderListSize) {
- try {
- decoder.setMaxHeaderListSize(maxHeaderListSize);
- } catch (Http2Exception e) {
- PlatformDependent.throwException(e);
- }
- }
-
- @Override
- public Http2HeaderTable headerTable() {
- return headerTable;
+ decoder = new Decoder(maxHeaderListSize, 32 /* same as default */);
}
@Override
@@ -114,26 +103,30 @@ abstract class GrpcHttp2HeadersDecoder implements Http2HeadersDecoder,
return this;
}
- private final class GrpcHttp2HeaderTable implements Http2HeaderTable {
- @Override
- public void maxHeaderTableSize(long max) throws Http2Exception {
- decoder.setMaxHeaderTableSize(max);
- }
+ @Override
+ public long maxHeaderListSize() {
+ return decoder.getMaxHeaderListSize();
+ }
- @Override
- public long maxHeaderTableSize() {
- return decoder.getMaxHeaderTableSize();
- }
+ @Override
+ public void maxHeaderListSize(long maxHeaderListSize, long maxHeaderListSizeGoAway)
+ throws Http2Exception {
+ decoder.setMaxHeaderListSize(maxHeaderListSize, maxHeaderListSizeGoAway);
+ }
- @Override
- public void maxHeaderListSize(long max) throws Http2Exception {
- decoder.setMaxHeaderListSize(max);
- }
+ @Override
+ public long maxHeaderListSizeGoAway() {
+ return decoder.getMaxHeaderListSizeGoAway();
+ }
- @Override
- public long maxHeaderListSize() {
- return decoder.getMaxHeaderListSize();
- }
+ @Override
+ public long maxHeaderTableSize() {
+ return decoder.getMaxHeaderTableSize();
+ }
+
+ @Override
+ public void maxHeaderTableSize(long max) throws Http2Exception {
+ decoder.setMaxHeaderTableSize(max);
}
static final class GrpcHttp2ServerHeadersDecoder extends GrpcHttp2HeadersDecoder {