mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-01 11:01:46 +00:00
MEDIUM: mux-h2: pass trailers to H1 (legacy mode)
When forwarding an H2 request to an H1 server, if the request doesn't have a content-length header field, it is chunked. In this case it is possible to send trailers to the server, which is what this patch does. If the transfer is performed without chunking, then the trailers are silently discarded.
This commit is contained in:
parent
9d953e7572
commit
e2b05ccff5
@ -3469,7 +3469,12 @@ next_frame:
|
||||
* data block message emit the trailing CRLF */
|
||||
if (!b_putblk(rxbuf, "0\r\n", 3))
|
||||
goto fail;
|
||||
/* FIXME: emit the decoded trailers here */
|
||||
|
||||
outlen = h2_make_h1_trailers(list, b_tail(rxbuf), try);
|
||||
if (outlen > 0)
|
||||
b_add(rxbuf, outlen);
|
||||
else
|
||||
goto fail;
|
||||
}
|
||||
|
||||
goto done;
|
||||
|
Loading…
Reference in New Issue
Block a user