mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
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:
parent
0b97bf36fa
commit
378c182192
@ -191,10 +191,10 @@ int qpack_encode_scheme(struct buffer *out, const struct ist scheme)
|
|||||||
b_putchr(out, istptr(scheme)[i]);
|
b_putchr(out, istptr(scheme)[i]);
|
||||||
}
|
}
|
||||||
else {
|
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)
|
if (b_room(out) < 2)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user