From: Amaury Denoyelle Date: Tue, 24 Aug 2021 13:36:02 +0000 (+0200) Subject: MINOR: h3: allocate stream on headers X-Git-Tag: v2.5-dev8~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=990435561be6d02b9a958317cd2fca2e1ed88919;p=thirdparty%2Fhaproxy.git MINOR: h3: allocate stream on headers --- diff --git a/src/h3.c b/src/h3.c index 6f5903eae7..ed0575014e 100644 --- a/src/h3.c +++ b/src/h3.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include @@ -25,6 +26,7 @@ #include #include #include +#include #include #include @@ -125,6 +127,7 @@ static int h3_decode_qcs(struct qcs *qcs, void *ctx) struct h3 *h3 = ctx; struct htx *htx; struct htx_sl *sl; + struct conn_stream *cs; struct http_hdr list[global.tune.max_http_hdr]; unsigned int flags = HTX_SL_F_NONE; int hdr_idx; @@ -215,6 +218,14 @@ static int h3_decode_qcs(struct qcs *qcs, void *ctx) htx_add_endof(htx, HTX_BLK_EOH); htx_to_buf(htx, &htx_buf); + + cs = cs_new(qcs->qcc->conn, qcs->qcc->conn->target); + cs->ctx = qcs; + stream_create_from_cs(cs, &htx_buf); + + /* buffer is transfered to conn_stream and set to NULL + * except on stream creation error. + */ b_free(&htx_buf); break;