summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_conf_validation.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2018-07-09 20:34:51 +0300
committerValentin Bartenev <vbart@nginx.com>2018-07-09 20:34:51 +0300
commit1abdcfb2d85a04b27ac4fc52619b63917b980839 (patch)
tree64c1e37f2e45e7ed920732d172504abc77f05ca5 /src/nxt_conf_validation.c
parent5a05f569b7a637649ce13c40f9d7758b0c37abe6 (diff)
downloadunit-1abdcfb2d85a04b27ac4fc52619b63917b980839.tar.gz
unit-1abdcfb2d85a04b27ac4fc52619b63917b980839.tar.bz2
Controller: added "settings" configuration object.
It has the following structure and default values: { "http": { "header_read_timeout": 30, "body_read_timeout": 30, "send_timeout": 30, "idle_timeout": 180, "max_body_size": 8388608 } }
Diffstat (limited to 'src/nxt_conf_validation.c')
-rw-r--r--src/nxt_conf_validation.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/nxt_conf_validation.c b/src/nxt_conf_validation.c
index 0b740c10..d51ff0ef 100644
--- a/src/nxt_conf_validation.c
+++ b/src/nxt_conf_validation.c
@@ -73,7 +73,52 @@ static nxt_int_t nxt_conf_vldt_php_option(nxt_conf_validation_t *vldt,
nxt_str_t *name, nxt_conf_value_t *value);
+static nxt_conf_vldt_object_t nxt_conf_vldt_http_members[] = {
+ { nxt_string("header_read_timeout"),
+ NXT_CONF_VLDT_INTEGER,
+ NULL,
+ NULL },
+
+ { nxt_string("body_read_timeout"),
+ NXT_CONF_VLDT_INTEGER,
+ NULL,
+ NULL },
+
+ { nxt_string("send_timeout"),
+ NXT_CONF_VLDT_INTEGER,
+ NULL,
+ NULL },
+
+ { nxt_string("idle_timeout"),
+ NXT_CONF_VLDT_INTEGER,
+ NULL,
+ NULL },
+
+ { nxt_string("max_body_size"),
+ NXT_CONF_VLDT_INTEGER,
+ NULL,
+ NULL },
+
+ NXT_CONF_VLDT_END
+};
+
+
+static nxt_conf_vldt_object_t nxt_conf_vldt_setting_members[] = {
+ { nxt_string("http"),
+ NXT_CONF_VLDT_OBJECT,
+ &nxt_conf_vldt_object,
+ (void *) &nxt_conf_vldt_http_members },
+
+ NXT_CONF_VLDT_END
+};
+
+
static nxt_conf_vldt_object_t nxt_conf_vldt_root_members[] = {
+ { nxt_string("settings"),
+ NXT_CONF_VLDT_OBJECT,
+ &nxt_conf_vldt_object,
+ (void *) &nxt_conf_vldt_setting_members },
+
{ nxt_string("listeners"),
NXT_CONF_VLDT_OBJECT,
&nxt_conf_vldt_object_iterator,