mirror of
https://github.com/nginx/nginx.git
synced 2024-12-22 15:13:28 -06:00
HTTP/2: emit PROTOCOL_ERROR on padding errors.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
This commit is contained in:
parent
f2393f8fef
commit
239e5ac063
@ -812,7 +812,8 @@ ngx_http_v2_state_data(ngx_http_v2_connection_t *h2c, u_char *pos, u_char *end)
|
|||||||
"with incorrect length: %uz, padding: %uz",
|
"with incorrect length: %uz, padding: %uz",
|
||||||
size, h2c->state.padding);
|
size, h2c->state.padding);
|
||||||
|
|
||||||
return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
|
return ngx_http_v2_connection_error(h2c,
|
||||||
|
NGX_HTTP_V2_PROTOCOL_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
h2c->state.length -= 1 + h2c->state.padding;
|
h2c->state.length -= 1 + h2c->state.padding;
|
||||||
@ -1055,7 +1056,8 @@ ngx_http_v2_state_headers(ngx_http_v2_connection_t *h2c, u_char *pos,
|
|||||||
"with incorrect length: %uz, padding: %uz",
|
"with incorrect length: %uz, padding: %uz",
|
||||||
h2c->state.length, h2c->state.padding);
|
h2c->state.length, h2c->state.padding);
|
||||||
|
|
||||||
return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
|
return ngx_http_v2_connection_error(h2c,
|
||||||
|
NGX_HTTP_V2_PROTOCOL_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
h2c->state.length -= h2c->state.padding;
|
h2c->state.length -= h2c->state.padding;
|
||||||
|
Loading…
Reference in New Issue
Block a user