From b8883101d32be9990e001d2a117005d706e3602d Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 18 Aug 2016 17:19:24 +0900 Subject: [PATCH] deflatehd: Call nghttp2_hd_deflate_change_table_size only if table size is changed from default --- src/deflatehd.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/deflatehd.cc b/src/deflatehd.cc index 373e1b3e..78d964f9 100644 --- a/src/deflatehd.cc +++ b/src/deflatehd.cc @@ -181,7 +181,9 @@ static int deflate_hd_json(json_t *obj, nghttp2_hd_deflater *deflater, static nghttp2_hd_deflater *init_deflater() { nghttp2_hd_deflater *deflater; nghttp2_hd_deflate_new(&deflater, config.deflate_table_size); - nghttp2_hd_deflate_change_table_size(deflater, config.table_size); + if (config.table_size != NGHTTP2_DEFAULT_HEADER_TABLE_SIZE) { + nghttp2_hd_deflate_change_table_size(deflater, config.table_size); + } return deflater; }