From 536d2aafa397f625897a0054b53d96cb9d614fcd Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Tue, 9 Sep 2025 11:20:25 +0200 Subject: [PATCH] BUG/MINOR: hq-interop: adjust parsing/encoding on backend side HTTP/0.9 is available on top of QUIC. This protocol is reserved for internal use, mostly interop purpose. This patch adjusts HTTP/0.9 layer with the following changes : * version is not emitted anymore on the status line. This is performed as some servers does not parse it correctly. * status line is set explicitely on HTX status-line. This ensures the correct HTTP status code is reported to the upper stream layer. This does not need to be backported. --- src/hq_interop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hq_interop.c b/src/hq_interop.c index 3ded46266..74240a1f7 100644 --- a/src/hq_interop.c +++ b/src/hq_interop.c @@ -115,6 +115,7 @@ static ssize_t hq_interop_rcv_buf_res(struct qcs *qcs, struct buffer *b, int fin sl = htx_add_stline(htx, HTX_BLK_RES_SL, flags, ist("HTTP/1.0"), ist("200"), ist("")); BUG_ON(!sl); + sl->info.res.status = 200; if (fin && !to_copy) sl->flags |= HTX_SL_F_BODYLESS; htx_add_endof(htx, HTX_BLK_EOH); @@ -200,7 +201,7 @@ static size_t hq_interop_snd_buf(struct qcs *qcs, struct buffer *buf, /* Only GET supported for HTTP/0.9. */ b_putist(res, ist("GET ")); b_putist(res, htx_sl_req_uri(sl)); - b_putist(res, ist(" HTTP/0.9\r\n")); + b_putist(res, ist("\r\n")); htx_remove_blk(htx, blk); total += fsize; break;