mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-15 20:39:44 -04:00
BUG/MINOR: qpack: do not consider empty enc/dec stream as error
When parsing QPACK encoder/decoder streams, h3_decode_qcs() displays an error trace if they are empty. Change the return code used in QPACK code to avoid this trace. To uniformize with MUX/H3 code, 0 is now used to indicate success. Beyond this spurious error trace, this bug has no impact.
This commit is contained in:
parent
9f17a5aa8a
commit
5869cb669e
2 changed files with 12 additions and 6 deletions
4
src/h3.c
4
src/h3.c
|
|
@ -238,11 +238,11 @@ static int h3_parse_uni_stream_no_h3(struct qcs *qcs, struct ncbuf *rxbuf)
|
|||
|
||||
switch (h3s->type) {
|
||||
case H3S_T_QPACK_DEC:
|
||||
if (!qpack_decode_dec(qcs, NULL))
|
||||
if (qpack_decode_dec(qcs, NULL))
|
||||
return 1;
|
||||
break;
|
||||
case H3S_T_QPACK_ENC:
|
||||
if (!qpack_decode_enc(qcs, NULL))
|
||||
if (qpack_decode_enc(qcs, NULL))
|
||||
return 1;
|
||||
break;
|
||||
case H3S_T_UNKNOWN:
|
||||
|
|
|
|||
|
|
@ -93,7 +93,10 @@ static uint64_t qpack_get_varint(const unsigned char **buf, uint64_t *len_in, in
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Decode an encoder stream */
|
||||
/* Decode an encoder stream.
|
||||
*
|
||||
* Returns 0 on success else non-zero.
|
||||
*/
|
||||
int qpack_decode_enc(struct qcs *qcs, void *ctx)
|
||||
{
|
||||
size_t len;
|
||||
|
|
@ -123,10 +126,13 @@ int qpack_decode_enc(struct qcs *qcs, void *ctx)
|
|||
/* Set dynamic table capacity */
|
||||
}
|
||||
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Decode an decoder stream */
|
||||
/* Decode an decoder stream.
|
||||
*
|
||||
* Returns 0 on success else non-zero.
|
||||
*/
|
||||
int qpack_decode_dec(struct qcs *qcs, void *ctx)
|
||||
{
|
||||
size_t len;
|
||||
|
|
@ -153,7 +159,7 @@ int qpack_decode_dec(struct qcs *qcs, void *ctx)
|
|||
/* Stream cancellation */
|
||||
}
|
||||
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Decode a field section prefix made of <enc_ric> and <db> two varints.
|
||||
|
|
|
|||
Loading…
Reference in a new issue