codec: Raise max_request_headers_kb limit to 96 KiB (#5859)

Bump up max configurable max_request_headers_kb to 96 KiB.
Add a check to http1/codec_impl.cc for headers size.
Raise the default library limits in http_parser nghttp2 so we'll rely on our own codec check.

Risk Level: Medium.
Testing: Moved all the large request headers tests to ProtocolIntegrationTest.
Part of #5626.

Signed-off-by: Auni Ahsan <auni@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ df3d47f478c29188d22b517d1a0d05793dfe2c62
pull/620/head
data-plane-api(CircleCI) 6 years ago
parent 23423a3fae
commit 3445084e65
  1. 13
      envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto

@ -137,14 +137,13 @@ message HttpConnectionManager {
// header in responses. If not set, the default is *envoy*.
string server_name = 10;
// The maximum request headers size for incoming connections. The default max
// is 60K, based on default settings for http codecs. For HTTP1, the current
// limit set by http_parser is 80K. for HTTP2, the default allowed header
// block in nghttp2 is 64K. The max configurable setting is 64K in order to
// stay under both codec limits.
// Requests that exceed this size will receive a 431 response.
// The maximum request headers size for incoming connections.
// If unconfigured, the default max request headers allowed is 60 KiB.
// Requests that exceed this limit will receive a 431 response.
// The max configurable limit is 96 KiB, based on current implementation
// constraints.
google.protobuf.UInt32Value max_request_headers_kb = 29
[(validate.rules).uint32.gt = 0, (validate.rules).uint32.lte = 64];
[(validate.rules).uint32.gt = 0, (validate.rules).uint32.lte = 96];
// The idle timeout for connections managed by the connection manager. The
// idle timeout is defined as the period in which there are no active

Loading…
Cancel
Save