From 2ecbe5948d66523ed3a65f91e5873107fe5d83fb Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Thu, 24 Dec 2020 01:15:55 -0500 Subject: [PATCH] [mod_proxy] fix sending of initial reqbody chunked fix sending of initial reqbody chunked to backend --- src/mod_proxy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mod_proxy.c b/src/mod_proxy.c index 711d297d..ac68a20c 100644 --- a/src/mod_proxy.c +++ b/src/mod_proxy.c @@ -1026,11 +1026,14 @@ static handler_t proxy_create_env(gw_handler_ctx *gwhctx) { chunkqueue_prepend_buffer_commit(&hctx->gw.wb); if (r->reqbody_length) { - chunkqueue_append_chunkqueue(&hctx->gw.wb, &r->reqbody_queue); if (r->reqbody_length > 0) hctx->gw.wb_reqlen += r->reqbody_length; /* total req size */ else /* as-yet-unknown total request size (Transfer-Encoding: chunked)*/ hctx->gw.wb_reqlen = -hctx->gw.wb_reqlen; + if (hctx->gw.stdin_append == proxy_stdin_append) + proxy_stdin_append(&hctx->gw); + else + chunkqueue_append_chunkqueue(&hctx->gw.wb, &r->reqbody_queue); } status_counter_inc(CONST_STR_LEN("proxy.requests"));