client_body_in_single_buffer
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index bfd812b..a08cada 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c
@@ -361,6 +361,13 @@ offsetof(ngx_http_core_loc_conf_t, client_body_in_file_only), &ngx_http_core_request_body_in_file }, + { ngx_string("client_body_in_single_buffer"), + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, + ngx_conf_set_flag_slot, + NGX_HTTP_LOC_CONF_OFFSET, + offsetof(ngx_http_core_loc_conf_t, client_body_in_single_buffer), + NULL }, + { ngx_string("sendfile"), NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF |NGX_CONF_TAKE1, @@ -1317,6 +1324,8 @@ r->request_body_file_log_level = NGX_LOG_WARN; } + r->request_body_in_single_buf = clcf->client_body_in_single_buffer; + if (r->keepalive && clcf->keepalive_timeout == 0) { r->keepalive = 0; } @@ -2954,6 +2963,7 @@ lcf->satisfy = NGX_CONF_UNSET_UINT; lcf->if_modified_since = NGX_CONF_UNSET_UINT; lcf->client_body_in_file_only = NGX_CONF_UNSET_UINT; + lcf->client_body_in_single_buffer = NGX_CONF_UNSET; lcf->internal = NGX_CONF_UNSET; lcf->sendfile = NGX_CONF_UNSET; lcf->sendfile_max_chunk = NGX_CONF_UNSET_SIZE; @@ -3146,6 +3156,8 @@ NGX_HTTP_IMS_EXACT); ngx_conf_merge_uint_value(conf->client_body_in_file_only, prev->client_body_in_file_only, 0); + ngx_conf_merge_value(conf->client_body_in_single_buffer, + prev->client_body_in_single_buffer, 0); ngx_conf_merge_value(conf->internal, prev->internal, 0); ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0); ngx_conf_merge_size_value(conf->sendfile_max_chunk,
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h index 915b438..6abfc6e 100644 --- a/src/http/ngx_http_core_module.h +++ b/src/http/ngx_http_core_module.h
@@ -341,6 +341,8 @@ ngx_uint_t if_modified_since; /* if_modified_since */ ngx_uint_t client_body_in_file_only; /* client_body_in_file_only */ + ngx_flag_t client_body_in_single_buffer; + /* client_body_in_singe_buffer */ ngx_flag_t internal; /* internal */ ngx_flag_t sendfile; /* sendfile */ ngx_flag_t tcp_nopush; /* tcp_nopush */