Commit 22df6f41 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttp2_hd: Fix bug on local_hd_table_bufsize_max > hd_table_bufsize_max

parent f49fb2b8
......@@ -804,10 +804,6 @@ static nghttp2_hd_entry* add_hd_table_incremental(nghttp2_hd_context *context,
free(new_ent);
return NULL;
}
if(context->role == NGHTTP2_HD_ROLE_DEFLATE) {
context->local_hd_table_bufsize += room;
++context->local_hd_tablelen;
}
}
if(room > context->hd_table_bufsize_max) {
/* The entry taking more than NGHTTP2_HD_MAX_BUFFER_SIZE is
......@@ -817,6 +813,11 @@ static nghttp2_hd_entry* add_hd_table_incremental(nghttp2_hd_context *context,
context->hd_table_bufsize += room;
new_ent->flags |= NGHTTP2_HD_FLAG_REFSET;
nghttp2_hd_ringbuf_push_front(&context->hd_table, new_ent);
if(context->role == NGHTTP2_HD_ROLE_DEFLATE &&
room <= context->local_hd_table_bufsize_max) {
context->local_hd_table_bufsize += room;
++context->local_hd_tablelen;
}
}
return new_ent;
}
......
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