# HG changeset patch # User Igor Sysoev # Date 1242301293 0 # Node ID 10d6b995045343a0fba6864f77b1c99b78306ef6 # Parent 2f3c80ff2123fb157ca12336879f6e1805f3e2f5 client_body_in_single_buffer diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -361,6 +361,13 @@ static ngx_command_t ngx_http_core_comm 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 @@ ngx_http_update_location_config(ngx_http 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 @@ ngx_http_core_create_loc_conf(ngx_conf_t 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_core_merge_loc_conf(ngx_conf_t 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 --- a/src/http/ngx_http_core_module.h +++ b/src/http/ngx_http_core_module.h @@ -341,6 +341,8 @@ struct ngx_http_core_loc_conf_s { 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 */