diff options
author | Igor Sysoev <igor@sysoev.ru> | 2007-05-07 06:33:39 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2007-05-07 06:33:39 +0000 |
commit | c9b57dc081a33f7102587dd3e8b7e84879f89107 (patch) | |
tree | 9c39383604b126cf03ad0593bf921f072dd56782 /src/http/ngx_http_core_module.c | |
parent | 544e9f1fd703931a5e6c8b580da18b31c7e9be3e (diff) | |
download | nginx-c9b57dc081a33f7102587dd3e8b7e84879f89107.tar.gz nginx-c9b57dc081a33f7102587dd3e8b7e84879f89107.zip |
sendfile_max_chunk
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 76f5e9831..97f33f0f5 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -295,6 +295,13 @@ static ngx_command_t ngx_http_core_commands[] = { offsetof(ngx_http_core_loc_conf_t, sendfile), NULL }, + { ngx_string("sendfile_max_chunk"), + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, + ngx_conf_set_size_slot, + NGX_HTTP_LOC_CONF_OFFSET, + offsetof(ngx_http_core_loc_conf_t, sendfile_max_chunk), + NULL }, + { ngx_string("tcp_nopush"), NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, ngx_conf_set_flag_slot, @@ -2191,6 +2198,7 @@ ngx_http_core_create_loc_conf(ngx_conf_t *cf) lcf->internal = NGX_CONF_UNSET; lcf->client_body_in_file_only = NGX_CONF_UNSET; lcf->sendfile = NGX_CONF_UNSET; + lcf->sendfile_max_chunk = NGX_CONF_UNSET_SIZE; lcf->tcp_nopush = NGX_CONF_UNSET; lcf->tcp_nodelay = NGX_CONF_UNSET; lcf->send_timeout = NGX_CONF_UNSET_MSEC; @@ -2359,6 +2367,8 @@ ngx_http_core_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) ngx_conf_merge_value(conf->client_body_in_file_only, prev->client_body_in_file_only, 0); ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0); + ngx_conf_merge_size_value(conf->sendfile_max_chunk, + prev->sendfile_max_chunk, 0); ngx_conf_merge_value(conf->tcp_nopush, prev->tcp_nopush, 0); ngx_conf_merge_value(conf->tcp_nodelay, prev->tcp_nodelay, 1); |