BUG/MEDIUM: mux-h2: fix encoding of non-GET/POST methods
Jerome reported that outgoing H2 failed for methods different from GET
or POST. It turns out that the HPACK encoding is performed by hand in
the outgoing headers encoding function and that the data length was not
incremented to cover the literal method value, resulting in a corrupted
HEADERS frame.
Admittedly this code should move to the generic HPACK code.
No backport is needed.
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 49303a5..c83230a 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -4096,6 +4096,7 @@
outbuf.area[outbuf.data++] = 0x42; // indexed name -- name=":method" (idx 2)
outbuf.area[outbuf.data++] = meth.len; // method length
memcpy(&outbuf.area[outbuf.data], meth.ptr, meth.len);
+ outbuf.data += meth.len;
}
else {
if (b_space_wraps(&h2c->mbuf))