summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-05-14 11:41:33 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-05-14 11:41:33 +0000
commitbfbded71fce2540af08e6dd082e7013dbf02c5b8 (patch)
tree5b48a60e6fe908439b459704dd0789c3fb4e29e6 /src
parentff07f319c9e992ffbf2fde78ad278eb519e534d5 (diff)
downloadnginx-bfbded71fce2540af08e6dd082e7013dbf02c5b8.tar.gz
nginx-bfbded71fce2540af08e6dd082e7013dbf02c5b8.tar.bz2
client_body_in_single_buffer
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_core_module.c12
-rw-r--r--src/http/ngx_http_core_module.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index bfd812bd6..a08cadafe 100644
--- 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_commands[] = {
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_request_t *r)
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 *cf)
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 *cf, void *parent, void *child)
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 915b438bc..6abfc6e23 100644
--- 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 */