From 55b074e96e21d4c910aaa5247fff05e3315dfa53 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 6 Aug 2013 21:59:41 +0900 Subject: [PATCH] Rename NGHTTP2_MAX_FRAME_SIZE as NGHTTP2_MAX_FRAME_LENGTH --- lib/nghttp2_frame.h | 2 +- lib/nghttp2_hd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nghttp2_frame.h b/lib/nghttp2_frame.h index dfb5acc0..23301dad 100644 --- a/lib/nghttp2_frame.h +++ b/lib/nghttp2_frame.h @@ -36,7 +36,7 @@ /* The maximum payload length of a frame */ /* TODO The spec says the max payload length in HTTP is ((1 << 14) - 1) */ -#define NGHTTP2_MAX_FRAME_SIZE ((1 << 16) - 1) +#define NGHTTP2_MAX_FRAME_LENGTH ((1 << 16) - 1) /* The maximum header block length. This is not specified by the spec. We just chose the arbitrary size */ diff --git a/lib/nghttp2_hd.c b/lib/nghttp2_hd.c index 5e5025f6..73bab959 100644 --- a/lib/nghttp2_hd.c +++ b/lib/nghttp2_hd.c @@ -532,7 +532,7 @@ static int ensure_write_buffer(uint8_t **buf_ptr, size_t *buflen_ptr, size_t offset, size_t need) { int rv; - if(need + offset > NGHTTP2_MAX_FRAME_SIZE) { + if(need + offset > NGHTTP2_MAX_FRAME_LENGTH) { return NGHTTP2_ERR_HEADER_COMP; } rv = nghttp2_reserve_buffer(buf_ptr, buflen_ptr, offset + need);