mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
HPACK: take sizing to 0 as clear existing
Apparently some peers set the HPACK size to zero and then try to set HPACK dynamic elements. Take it to mean keep the same size but clear it down.
This commit is contained in:
parent
3b44a745c9
commit
79bb26b6bd
1 changed files with 5 additions and 0 deletions
|
@ -597,6 +597,11 @@ lws_hpack_dynamic_size(struct lws *wsi, int size)
|
|||
(int)dyn->num_entries, size,
|
||||
nwsi->vhost->h2.set.s[H2SET_HEADER_TABLE_SIZE]);
|
||||
|
||||
if (!size) {
|
||||
size = dyn->num_entries * 8;
|
||||
lws_hpack_destroy_dynamic_header(wsi);
|
||||
}
|
||||
|
||||
if (size > (int)nwsi->vhost->h2.set.s[H2SET_HEADER_TABLE_SIZE]) {
|
||||
lwsl_info("rejecting hpack dyn size %u vs %u\n", size,
|
||||
nwsi->vhost->h2.set.s[H2SET_HEADER_TABLE_SIZE]);
|
||||
|
|
Loading…
Add table
Reference in a new issue