diff --git a/lib/nghttp2_hd.c b/lib/nghttp2_hd.c index c8a8af6f..4b6dbdff 100644 --- a/lib/nghttp2_hd.c +++ b/lib/nghttp2_hd.c @@ -366,7 +366,7 @@ int nghttp2_hd_inflate_init(nghttp2_hd_inflater *inflater) inflater->opcode = NGHTTP2_HD_OPCODE_NONE; 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) { goto nvbufs_fail; diff --git a/lib/nghttp2_hd.h b/lib/nghttp2_hd.h index 542e1894..1781c597 100644 --- a/lib/nghttp2_hd.h +++ b/lib/nghttp2_hd.h @@ -40,7 +40,7 @@ /* 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 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 remote decoder notifies larger buffer size for its decoding, diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c index 5e3a3924..c1a48752 100644 --- a/lib/nghttp2_session.c +++ b/lib/nghttp2_session.c @@ -342,7 +342,7 @@ static int session_new(nghttp2_session **session_ptr, /* 1 for Pad Field. */ rv = nghttp2_bufs_init3(&(*session_ptr)->aob.framebufs, - NGHTTP2_FRAMEBUF_CHUNKLEN, 8, 1, + NGHTTP2_FRAMEBUF_CHUNKLEN, 4, 1, NGHTTP2_FRAME_HDLEN + 1); if(rv != 0) { goto fail_aob_framebuf;