mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-28 04:12:17 -04:00
BUG/MINOR: h3: reject server push stream
Push streams are not supported by haproxy as a client. Thus, it never emits any MAX_PUSH_ID frame. In this case, the server is not allowed to initiate any push stream. This patch ensures that such stream is closed with error H3_ID_ERROR, as specified by HTTP/3 RFC. This must be backported up to 3.3.
This commit is contained in:
parent
433cce7af1
commit
8e77620616
1 changed files with 14 additions and 2 deletions
16
src/h3.c
16
src/h3.c
|
|
@ -225,8 +225,20 @@ static ssize_t h3_init_uni_stream(struct h3c *h3c, struct qcs *qcs,
|
|||
qcc_report_glitch(qcs->qcc, 1);
|
||||
goto err;
|
||||
}
|
||||
/* TODO not supported for the moment */
|
||||
h3s->type = H3S_T_PUSH;
|
||||
else {
|
||||
/* RFC 9114 4.6. Server Push
|
||||
*
|
||||
* A client MUST treat receipt of a push stream as a connection
|
||||
* error of type H3_ID_ERROR when no MAX_PUSH_ID frame has been sent or
|
||||
* when the stream references a push ID that is greater than the maximum
|
||||
* push ID.
|
||||
*/
|
||||
TRACE_ERROR("reject push from server outside of MAX_PUSH_ID", H3_EV_H3S_NEW, qcs->qcc->conn, qcs);
|
||||
qcc_set_error(qcs->qcc, H3_ERR_ID_ERROR, 1,
|
||||
muxc_tevt_type_proto_err);
|
||||
qcc_report_glitch(qcs->qcc, 1);
|
||||
goto err;
|
||||
}
|
||||
break;
|
||||
|
||||
case H3_UNI_S_T_QPACK_DEC:
|
||||
|
|
|
|||
Loading…
Reference in a new issue