From 990435561be6d02b9a958317cd2fca2e1ed88919 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Tue, 24 Aug 2021 15:36:02 +0200 Subject: [PATCH] MINOR: h3: allocate stream on headers --- src/h3.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/h3.c b/src/h3.c index 6f5903eae..ed0575014 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;