Commit b8883101 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

deflatehd: Call nghttp2_hd_deflate_change_table_size only if table size is changed from default

parent 508c88f6
...@@ -181,7 +181,9 @@ static int deflate_hd_json(json_t *obj, nghttp2_hd_deflater *deflater, ...@@ -181,7 +181,9 @@ static int deflate_hd_json(json_t *obj, nghttp2_hd_deflater *deflater,
static nghttp2_hd_deflater *init_deflater() { static nghttp2_hd_deflater *init_deflater() {
nghttp2_hd_deflater *deflater; nghttp2_hd_deflater *deflater;
nghttp2_hd_deflate_new(&deflater, config.deflate_table_size); nghttp2_hd_deflate_new(&deflater, config.deflate_table_size);
if (config.table_size != NGHTTP2_DEFAULT_HEADER_TABLE_SIZE) {
nghttp2_hd_deflate_change_table_size(deflater, config.table_size); nghttp2_hd_deflate_change_table_size(deflater, config.table_size);
}
return deflater; return deflater;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment