[core] fix bug in FastCGI uploads
(thx zoon01 and ms49434)
x-ref:
"Memory Growth with PUT and full buffered streams"
@@ -2110,11 +2110,12 @@ handler_t gw_handle_subrequest(request_st * const r, void *p_d) {
if ((0 != hctx->wb.bytes_in || -1 == hctx->wb_reqlen)
&& !chunkqueue_is_empty(&r->reqbody_queue)) {
- if (hctx->stdin_append
- && chunkqueue_length(&hctx->wb) < 65536 - 16384) {
+ if (hctx->stdin_append) {
+ if (chunkqueue_length(&hctx->wb) < 65536 - 16384) {
handler_t rca = hctx->stdin_append(hctx);
if (HANDLER_GO_ON != rca) return rca;
}
+ }
else
chunkqueue_append_chunkqueue(&hctx->wb, &r->reqbody_queue);
if (fdevent_fdnode_interest(hctx->fdn) & FDEVENT_OUT) {
