From: Amaury Denoyelle Date: Wed, 9 Jul 2025 15:30:29 +0000 (+0200) Subject: BUG/MINOR: h3: fix https scheme request encoding for BE side X-Git-Tag: v3.3-dev3~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=378c1821929c8d2493642b7c299cce9e424773d9;p=thirdparty%2Fhaproxy.git BUG/MINOR: h3: fix https scheme request encoding for BE side An HTTP/3 request must contains :scheme pseudo-header. Currently, only "https" value is expected due to QUIC transport layer in use. However, https value is incorrectly encoded due to a QPACK index value mismatch in qpack_encode_scheme(). Fix it to ensure that scheme is now properly set for HTTP/3 requests on the backend side. No need to backport this. --- diff --git a/src/qpack-enc.c b/src/qpack-enc.c index 7766bb616..311d2ae20 100644 --- a/src/qpack-enc.c +++ b/src/qpack-enc.c @@ -191,10 +191,10 @@ int qpack_encode_scheme(struct buffer *out, const struct ist scheme) b_putchr(out, istptr(scheme)[i]); } else { - int idx = 23; + const int idx = isteq(scheme, ist("https")) ? + 23 : /* :scheme: https */ + 22; /* :scheme: http */ - if (unlikely(!isteq(scheme, ist("http")))) - idx = 22; if (b_room(out) < 2) return 1;