11 #define NGX_CONF_BUFFER 4096
16 static void ngx_conf_flush_files(
ngx_cycle_t *cycle);
72 if (param->
len == 0) {
115 #if (NGX_SUPPRESS_WARN)
144 if (buf.
start == NULL) {
172 rc = ngx_conf_read_token(cf);
190 if (
type != parse_block) {
200 if (
type == parse_block) {
202 "unexpected end of file, expecting \"}\"");
211 if (
type == parse_param) {
213 "block directives are not supported "
243 rc = ngx_conf_handler(cf, rc);
299 for ( ; cmd->
name.
len; cmd++) {
325 "directive \"%s\" is not terminated by \";\"",
332 "directive \"%s\" has no opening \"{\"",
363 }
else if (!(cmd->
type & argument_number[cf->
args->
nelts - 1]))
379 }
else if (cf->
ctx) {
380 confp = *(
void **) ((
char *) cf->
ctx + cmd->
conf);
387 rv = cmd->
set(cf, cmd, conf);
398 "\"%s\" directive %s", name->
data, rv);
406 "\"%s\" directive is not allowed here", name->
data);
412 "unknown directive \"%s\"", name->
data);
419 "invalid number of arguments in \"%s\" directive",
429 u_char *start, ch, *src, *dst;
433 ngx_uint_t found, need_space, last_space, sharp_comment, variable;
434 ngx_uint_t quoted, s_quoted, d_quoted, start_line;
460 if (cf->
args->
nelts > 0 || !last_space) {
464 "unexpected end of parameter, "
470 "unexpected end of file, "
471 "expecting \";\" or \"}\"");
478 len = b->
pos - start;
486 }
else if (s_quoted) {
491 "too long parameter \"%*s...\" started",
497 "too long parameter, probably "
498 "missing terminating \"%c\" character", ch);
508 if (size > b->
end - (b->
start + len)) {
522 "only %z bytes instead of %z",
552 if (ch ==
' ' || ch ==
'\t' || ch ==
CR || ch ==
LF) {
572 "unexpected \"%c\"", ch);
578 if (ch ==
' ' || ch ==
'\t' || ch ==
CR || ch ==
LF) {
591 "unexpected \"%c\"", ch);
636 if (ch ==
'{' && variable) {
659 }
else if (s_quoted) {
666 }
else if (ch ==
' ' || ch ==
'\t' || ch ==
CR || ch ==
LF
667 || ch ==
';' || ch ==
'{')
680 if (word->
data == NULL) {
684 for (dst = word->
data, src = start, len = 0;
750 if (strpbrk((
char *) file.
data,
"*?[") == NULL) {
800 u_char *p, *n, *prefix;
803 rc = ngx_conf_test_full_name(name);
862 if ((c0 >=
'a' && c0 <=
'z')) {
881 if (name->
data[0] ==
'/') {
899 #if (NGX_SUPPRESS_WARN)
915 if (i >= part->
nelts) {
916 if (part->
next == NULL) {
969 if (i >= part->
nelts) {
970 if (part->
next == NULL) {
987 const char *fmt, ...)
1009 p - errstr, errstr);
1031 return "is duplicate";
1039 }
else if (
ngx_strcasecmp(value[1].data, (u_char *)
"off") == 0) {
1044 "invalid value \"%s\" in \"%s\" directive, "
1045 "it must be \"on\" or \"off\"",
1070 return "is duplicate";
1149 kv->
value = value[2];
1173 return "is duplicate";
1177 *np =
ngx_atoi(value[1].data, value[1].len);
1179 return "invalid number";
1201 sp = (
size_t *) (p + cmd->
offset);
1203 return "is duplicate";
1210 return "invalid value";
1232 op = (off_t *) (p + cmd->
offset);
1234 return "is duplicate";
1241 return "invalid value";
1265 return "is duplicate";
1272 return "invalid value";
1294 sp = (time_t *) (p + cmd->
offset);
1296 return "is duplicate";
1303 return "invalid value";
1326 return "is duplicate";
1331 bufs->
num =
ngx_atoi(value[1].data, value[1].len);
1333 return "invalid value";
1338 return "invalid value";
1357 return "is duplicate";
1363 for (i = 0; e[
i].
name.
len != 0; i++) {
1364 if (e[i].name.
len != value[1].
len
1376 "invalid value \"%s\"", value[1].data);
1397 for (m = 0; mask[m].
name.
len != 0; m++) {
1399 if (mask[m].name.
len != value[i].
len
1405 if (*np & mask[m].mask) {
1407 "duplicate value \"%s\"", value[i].data);
1410 *np |= mask[m].mask;
1416 if (mask[m].name.
len == 0) {
1418 "invalid value \"%s\"", value[i].data);
1433 return "unsupported on this platform";
1445 "the \"%s\" directive is deprecated, "
1446 "use the \"%s\" directive instead",
1459 if (bounds->
high == -1) {
1460 if (*np >= bounds->
low) {
1465 "value must be equal to or greater than %i",
1471 if (*np >= bounds->
low && *np <= bounds->high) {
1476 "value must be between %i and %i",