Correctly take Http2FrameCodecBuilder.isValidateHeaders() into account when creating a Http2FrameCodec from an existing Http2FrameWriter. (#9600)
Motivation: We did miss to take Http2FrameCodecBuilder.isValidateHeaders() into account when a Http2FrameWriter was set on the builder and always assumed validation should be enabled. Modifications: Remove hardcode value and use configured value Result: Http2FrameCodecBuilder.isValidateHeaders() is respected in all cases
This commit is contained in:
parent
5d1414a8a9
commit
6f584ec9de
@ -189,8 +189,8 @@ public class Http2FrameCodecBuilder extends
|
||||
DefaultHttp2Connection connection = new DefaultHttp2Connection(isServer(), maxReservedStreams());
|
||||
Long maxHeaderListSize = initialSettings().maxHeaderListSize();
|
||||
Http2FrameReader frameReader = new DefaultHttp2FrameReader(maxHeaderListSize == null ?
|
||||
new DefaultHttp2HeadersDecoder(true) :
|
||||
new DefaultHttp2HeadersDecoder(true, maxHeaderListSize));
|
||||
new DefaultHttp2HeadersDecoder(isValidateHeaders()) :
|
||||
new DefaultHttp2HeadersDecoder(isValidateHeaders(), maxHeaderListSize));
|
||||
|
||||
if (frameLogger() != null) {
|
||||
frameWriter = new Http2OutboundFrameLogger(frameWriter, frameLogger());
|
||||
|
@ -215,8 +215,8 @@ public class Http2MultiplexCodecBuilder
|
||||
DefaultHttp2Connection connection = new DefaultHttp2Connection(isServer(), maxReservedStreams());
|
||||
Long maxHeaderListSize = initialSettings().maxHeaderListSize();
|
||||
Http2FrameReader frameReader = new DefaultHttp2FrameReader(maxHeaderListSize == null ?
|
||||
new DefaultHttp2HeadersDecoder(true) :
|
||||
new DefaultHttp2HeadersDecoder(true, maxHeaderListSize));
|
||||
new DefaultHttp2HeadersDecoder(isValidateHeaders()) :
|
||||
new DefaultHttp2HeadersDecoder(isValidateHeaders(), maxHeaderListSize));
|
||||
|
||||
if (frameLogger() != null) {
|
||||
frameWriter = new Http2OutboundFrameLogger(frameWriter, frameLogger());
|
||||
|
Loading…
Reference in New Issue
Block a user