mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-24 21:52:17 +00:00
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.
This commit is contained in:
parent
b36a6d21db
commit
ac77b6f441
@ -4096,6 +4096,7 @@ static size_t h2s_htx_bck_make_req_headers(struct h2s *h2s, struct htx *htx)
|
||||
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))
|
||||
|
Loading…
Reference in New Issue
Block a user