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.
This commit is contained in:
Amaury Denoyelle 2025-07-09 17:30:29 +02:00
parent 0b97bf36fa
commit 378c182192

View File

@ -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;