summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_core_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-08-29 12:45:03 +0000
committerIgor Sysoev <igor@sysoev.ru>2011-08-29 12:45:03 +0000
commit65a179b308bf5a472de4c7a2a20dba08a69651e7 (patch)
tree456cb9c196a839d03b5c759173fd7a0ab5fbc4ab /src/http/ngx_http_core_module.c
parent6bf8152c6cf9aef27609e51645a452e229c67588 (diff)
downloadnginx-65a179b308bf5a472de4c7a2a20dba08a69651e7.tar.gz
nginx-65a179b308bf5a472de4c7a2a20dba08a69651e7.tar.bz2
Merge of r3982, r3984, r3985, r3991:
Lingering closing related fixes: *) lingering_close "off|on|always" *) enable lingering close for pipelined requests *) do not send RST on normal lingering close read timeout, if reset_timedout_connection is on
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r--src/http/ngx_http_core_module.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 55b27c677..bbb9311cf 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -127,6 +127,14 @@ static ngx_conf_enum_t ngx_http_core_satisfy[] = {
};
+static ngx_conf_enum_t ngx_http_core_lingering_close[] = {
+ { ngx_string("off"), NGX_HTTP_LINGERING_OFF },
+ { ngx_string("on"), NGX_HTTP_LINGERING_ON },
+ { ngx_string("always"), NGX_HTTP_LINGERING_ALWAYS },
+ { ngx_null_string, 0 }
+};
+
+
static ngx_conf_enum_t ngx_http_core_if_modified_since[] = {
{ ngx_string("off"), NGX_HTTP_IMS_OFF },
{ ngx_string("exact"), NGX_HTTP_IMS_EXACT },
@@ -532,6 +540,13 @@ static ngx_command_t ngx_http_core_commands[] = {
0,
NULL },
+ { ngx_string("lingering_close"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+ ngx_conf_set_enum_slot,
+ NGX_HTTP_LOC_CONF_OFFSET,
+ offsetof(ngx_http_core_loc_conf_t, lingering_close),
+ &ngx_http_core_lingering_close },
+
{ ngx_string("lingering_time"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_msec_slot,
@@ -3259,6 +3274,7 @@ ngx_http_core_create_loc_conf(ngx_conf_t *cf)
clcf->keepalive_timeout = NGX_CONF_UNSET_MSEC;
clcf->keepalive_header = NGX_CONF_UNSET;
clcf->keepalive_requests = NGX_CONF_UNSET_UINT;
+ clcf->lingering_close = NGX_CONF_UNSET_UINT;
clcf->lingering_time = NGX_CONF_UNSET_MSEC;
clcf->lingering_timeout = NGX_CONF_UNSET_MSEC;
clcf->resolver_timeout = NGX_CONF_UNSET_MSEC;
@@ -3475,6 +3491,8 @@ ngx_http_core_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
prev->keepalive_header, 0);
ngx_conf_merge_uint_value(conf->keepalive_requests,
prev->keepalive_requests, 100);
+ ngx_conf_merge_uint_value(conf->lingering_close,
+ prev->lingering_close, NGX_HTTP_LINGERING_ON);
ngx_conf_merge_msec_value(conf->lingering_time,
prev->lingering_time, 30000);
ngx_conf_merge_msec_value(conf->lingering_timeout,