Support one header field size (name + value) up to 64KiB by default
This commits changes the upper bound of one header field size (the sum of the length of name and value) to 64KiB by default. We may add an option to change this upper bound in the future.
This commit is contained in:
parent
ff3a4a770f
commit
d318e6a62e
|
@ -366,7 +366,7 @@ int nghttp2_hd_inflate_init(nghttp2_hd_inflater *inflater)
|
||||||
inflater->opcode = NGHTTP2_HD_OPCODE_NONE;
|
inflater->opcode = NGHTTP2_HD_OPCODE_NONE;
|
||||||
inflater->state = NGHTTP2_HD_STATE_OPCODE;
|
inflater->state = NGHTTP2_HD_STATE_OPCODE;
|
||||||
|
|
||||||
rv = nghttp2_bufs_init(&inflater->nvbufs, NGHTTP2_HD_MAX_NV / 2, 2);
|
rv = nghttp2_bufs_init3(&inflater->nvbufs, NGHTTP2_HD_MAX_NV / 8, 8, 1, 0);
|
||||||
|
|
||||||
if(rv != 0) {
|
if(rv != 0) {
|
||||||
goto nvbufs_fail;
|
goto nvbufs_fail;
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
/* The maximum length of one name/value pair. This is the sum of the
|
/* The maximum length of one name/value pair. This is the sum of the
|
||||||
length of name and value. This is not specified by the spec. We
|
length of name and value. This is not specified by the spec. We
|
||||||
just chose the arbitrary size */
|
just chose the arbitrary size */
|
||||||
#define NGHTTP2_HD_MAX_NV 8192
|
#define NGHTTP2_HD_MAX_NV 65536
|
||||||
|
|
||||||
/* Default size of maximum table buffer size for encoder. Even if
|
/* Default size of maximum table buffer size for encoder. Even if
|
||||||
remote decoder notifies larger buffer size for its decoding,
|
remote decoder notifies larger buffer size for its decoding,
|
||||||
|
|
|
@ -342,7 +342,7 @@ static int session_new(nghttp2_session **session_ptr,
|
||||||
|
|
||||||
/* 1 for Pad Field. */
|
/* 1 for Pad Field. */
|
||||||
rv = nghttp2_bufs_init3(&(*session_ptr)->aob.framebufs,
|
rv = nghttp2_bufs_init3(&(*session_ptr)->aob.framebufs,
|
||||||
NGHTTP2_FRAMEBUF_CHUNKLEN, 8, 1,
|
NGHTTP2_FRAMEBUF_CHUNKLEN, 4, 1,
|
||||||
NGHTTP2_FRAME_HDLEN + 1);
|
NGHTTP2_FRAME_HDLEN + 1);
|
||||||
if(rv != 0) {
|
if(rv != 0) {
|
||||||
goto fail_aob_framebuf;
|
goto fail_aob_framebuf;
|
||||||
|
|
Loading…
Reference in New Issue