diff --git a/src/mod_proxy.c b/src/mod_proxy.c index e0d2cf5e..80d9a9b4 100644 --- a/src/mod_proxy.c +++ b/src/mod_proxy.c @@ -7,6 +7,7 @@ #include "base.h" #include "array.h" #include "buffer.h" +#include "fdevent.h" #include "http_kv.h" #include "http_header.h" #include "log.h" @@ -869,7 +870,9 @@ static handler_t proxy_create_env(gw_handler_ctx *gwhctx) { http_header_remap_uri(b, buffer_string_length(b) - buffer_string_length(&r->target), &hctx->conf.header, 1); int stream_chunked = 0; - if (-1 == r->reqbody_length && r->conf.stream_request_body) { + if (-1 == r->reqbody_length + && (r->conf.stream_request_body + & (FDEVENT_STREAM_REQUEST | FDEVENT_STREAM_REQUEST_BUFMIN))) { stream_chunked = 1; hctx->gw.stdin_append = proxy_stdin_append; } diff --git a/src/response.c b/src/response.c index 796b20b4..4033af15 100644 --- a/src/response.c +++ b/src/response.c @@ -63,7 +63,10 @@ int http_response_write_header(request_st * const r) { r->keep_alive = 0; } else if (0 != r->reqbody_length && r->reqbody_length != r->reqbody_queue->bytes_in - && (NULL == r->handler_module || 0 == r->conf.stream_request_body)) { + && (NULL == r->handler_module + || 0 == (r->conf.stream_request_body + & (FDEVENT_STREAM_REQUEST + | FDEVENT_STREAM_REQUEST_BUFMIN)))) { r->keep_alive = 0; } else { r->con->keep_alive_idle = r->conf.max_keep_alive_idle;