mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-08 16:23:24 -04:00
MINOR: qpack: do not encode invalid http status code
Ensure that the HTTP status code is valid before encoding with QPACK. An error is return if this is not the case.
This commit is contained in:
parent
485da0b053
commit
fccffe08b3
1 changed files with 3 additions and 0 deletions
|
|
@ -54,6 +54,9 @@ int qpack_encode_int_status(struct buffer *out, unsigned int status)
|
|||
{
|
||||
int status_size, idx = 0;
|
||||
|
||||
if (status < 100 || status > 599)
|
||||
return 1;
|
||||
|
||||
switch (status) {
|
||||
case 103: idx = 24; break;
|
||||
case 200: idx = 25; break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue