quic: handle h3 max header size option

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63483
Backport-PR-URL: https://github.com/nodejs/node/pull/64675
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
James M Snell authored and Antoine du Hamel committed 2026-08-06 11:33:36 +02:00
1 parent 39dca4150c
commit dbe0b371ee
2 files changed
+12 -1

No files matched your search

+7
View File
@@ -115,6 +115,13 @@ Maybe<Session::Application_Options> Session::Application_Options::From(
#undef SET
// Ensure the advertised max_field_section_size in SETTINGS is at least
// as large as max_header_length. Otherwise the peer would be told to
// restrict headers to a smaller size than what CanAddHeader accepts.
if (options.max_field_section_size < options.max_header_length) {
options.max_field_section_size = options.max_header_length;
}
return Just<Application_Options>(options);
}
+5 -1
View File
@@ -72,7 +72,11 @@ class Session final : public AsyncWrap, private SessionTicket::AppData::Source {
uint64_t max_header_length = DEFAULT_MAX_HEADER_LENGTH;
// HTTP/3 specific options.
uint64_t max_field_section_size = 0;
// The maximum header section size advertised to the peer in SETTINGS.
// Defaults to match max_header_length so the SETTINGS frame accurately
// reflects the enforcement limit. A value of 0 would incorrectly tell
// the peer not to send any headers at all.
uint64_t max_field_section_size = DEFAULT_MAX_HEADER_LENGTH;
uint64_t qpack_max_dtable_capacity = 4096;
uint64_t qpack_encoder_max_dtable_capacity = 4096;
uint64_t qpack_blocked_streams = 100;