19 #define NGX_HTTP_REQUEST_BODY_FILE_OFF 0
20 #define NGX_HTTP_REQUEST_BODY_FILE_ON 1
21 #define NGX_HTTP_REQUEST_BODY_FILE_CLEAN 2
29 static void *ngx_http_core_create_main_conf(
ngx_conf_t *cf);
30 static char *ngx_http_core_init_main_conf(
ngx_conf_t *cf,
void *conf);
31 static void *ngx_http_core_create_srv_conf(
ngx_conf_t *cf);
32 static char *ngx_http_core_merge_srv_conf(
ngx_conf_t *cf,
33 void *parent,
void *child);
34 static void *ngx_http_core_create_loc_conf(
ngx_conf_t *cf);
35 static char *ngx_http_core_merge_loc_conf(
ngx_conf_t *cf,
36 void *parent,
void *child);
75 static ngx_uint_t ngx_http_gzip_quantity(u_char *p, u_char *last);
87 static char *ngx_http_core_lowat_check(
ngx_conf_t *cf,
void *post,
void *data);
88 static char *ngx_http_core_pool_size(
ngx_conf_t *cf,
void *post,
void *data);
91 { ngx_http_core_lowat_check };
94 ngx_http_core_pool_size;
117 #if (NGX_HAVE_FILE_AIO)
122 #if (NGX_HAVE_AIO_SENDFILE)
220 {
ngx_string(
"server_names_hash_bucket_size"),
229 ngx_http_core_server,
239 &ngx_http_core_pool_size_p },
246 &ngx_http_core_pool_size_p },
274 &ngx_conf_deprecated_optimize_server_names },
299 ngx_http_core_location,
306 ngx_http_core_listen,
313 ngx_http_core_server_name,
364 ngx_http_core_limit_except,
402 &ngx_http_core_request_body_in_file },
426 #if (NGX_HAVE_FILE_AIO)
433 &ngx_http_core_aio },
446 ngx_http_core_directio,
484 &ngx_http_core_lowat_post },
511 ngx_http_core_keepalive,
528 &ngx_http_core_keepalive_disable },
535 &ngx_http_core_satisfy },
542 &ngx_conf_deprecated_satisfy_any },
546 ngx_http_core_internal,
556 &ngx_http_core_lingering_close },
640 &ngx_http_core_if_modified_since },
666 ngx_http_core_error_page,
673 ngx_http_core_try_files,
688 ngx_http_core_error_log,
695 ngx_http_core_open_file_cache,
712 &ngx_conf_deprecated_open_file_cache_retest },
737 ngx_http_core_resolver,
763 &ngx_http_gzip_http_version },
770 &ngx_http_gzip_proxied_mask },
774 ngx_http_gzip_disable,
781 #if (NGX_HAVE_OPENAT)
785 ngx_http_disable_symlinks,
797 ngx_http_core_preconfiguration,
800 ngx_http_core_create_main_conf,
801 ngx_http_core_init_main_conf,
803 ngx_http_core_create_srv_conf,
804 ngx_http_core_merge_srv_conf,
806 ngx_http_core_create_loc_conf,
807 ngx_http_core_merge_loc_conf
813 &ngx_http_core_module_ctx,
814 ngx_http_core_commands,
973 rc = ngx_http_core_find_location(r);
988 "using configuration \"%s%V\"",
1004 "client intended to send too large body: %O bytes",
1084 "rewrite or internal redirection cycle "
1085 "while processing \"%V\"", &r->
uri);
1175 "access forbidden by rule");
1192 size_t len, root, alias, reserve, allocated;
1221 alias = clcf->
alias;
1234 while (*(uintptr_t *) e.
ip) {
1247 }
else if (clcf->regex) {
1252 reserve = len > r->
uri.
len - alias ? len - (r->
uri.
len - alias) : 0;
1255 if (reserve > allocated || !allocated) {
1258 allocated = reserve + 16;
1265 name = path.
data + root;
1268 if (tf->
values == NULL) {
1281 while (*(uintptr_t *) e.
ip) {
1301 "trying to use %s: \"%s\" \"%s\"",
1302 test_dir ?
"dir" :
"file", name, path.
data);
1314 if (path.
data[0] ==
'@') {
1356 if (of.
is_dir && !test_dir) {
1367 }
else if (clcf->regex) {
1388 "try file uri: \"%V\"", &r->
uri);
1437 "directory index of \"%s\" is forbidden", path.
data);
1568 rc = ngx_http_core_find_location(r);
1579 if (noregex == 0 && pclcf->regex_locations) {
1581 for (clcfp = pclcf->regex_locations; *clcfp; clcfp++) {
1584 "test location: ~ \"%V\"", &(*clcfp)->name);
1586 n = ngx_http_regex_exec(r, (*clcfp)->regex, &r->
uri);
1593 rc = ngx_http_core_find_location(r);
1638 "test location: \"%*s\"", node->
len, node->
name);
1640 n = (len <= (size_t) node->
len) ? len : node->
len;
1645 node = (rc < 0) ? node->
left : node->
right;
1650 if (len > (
size_t) node->
len) {
1671 if (len == (
size_t) node->
len) {
1704 if (types_hash->
size == 0) {
1717 if (lowcase == NULL) {
1725 for (i = 0; i < len; i++) {
1757 for (i = 0; i < r->
exten.
len; i++) {
1760 if (c >=
'A' && c <=
'Z') {
1763 if (exten == NULL) {
1802 for (i = r->
uri.
len - 1; i > 1; i--) {
1810 }
else if (r->
uri.
data[i] ==
'/') {
1954 "http output filter \"%V?%V\"", &r->
uri, &r->
args);
1969 size_t *root_length,
size_t reserved)
1977 alias = clcf->
alias;
1981 "\"alias\" cannot be used in location \"%V\" "
1982 "where URI was rewritten", &clcf->
name);
1988 *root_length = clcf->
root.
len;
1993 if (path->
data == NULL) {
2004 captures = alias && clcf->regex;
2007 : r->
uri.
len - alias + 1;
2009 reserved += r->
uri.
len - alias + 1;
2023 *root_length = path->
len - reserved;
2024 last = path->
data + *root_length;
2061 if (encoded.
len <
sizeof(
"Basic ") - 1
2063 sizeof(
"Basic ") - 1)
2070 encoded.
len -=
sizeof(
"Basic ") - 1;
2071 encoded.
data +=
sizeof(
"Basic ") - 1;
2073 while (encoded.
len && encoded.
data[0] ==
' ') {
2078 if (encoded.
len == 0) {
2085 if (auth.
data == NULL) {
2096 for (len = 0; len < auth.
len; len++) {
2097 if (auth.
data[len] ==
':') {
2102 if (len == 0 || len == auth.
len) {
2121 time_t
date, expires;
2134 if (r->spdy_stream) {
2145 if (ae->
value.
len <
sizeof(
"gzip") - 1) {
2159 && ngx_http_gzip_accept_encoding(&ae->
value) !=
NGX_OK)
2178 p = clcf->gzip_proxied;
2217 if (expires < date) {
2294 ngx_http_gzip_accept_encoding(
ngx_str_t *ae)
2296 u_char *p, *start, *last;
2299 last = start + ae->
len;
2307 if (p == start || (*(p - 1) ==
',' || *(p - 1) ==
' ')) {
2349 if (p + 2 > last || *p++ !=
'=') {
2353 if (ngx_http_gzip_quantity(p, last) == 0) {
2362 ngx_http_gzip_quantity(u_char *p, u_char *last)
2369 if (c !=
'0' && c !=
'1') {
2373 q = (c -
'0') * 100;
2381 if (c ==
',' || c ==
' ') {
2394 if (c ==
',' || c ==
' ') {
2398 if (c >=
'0' && c <=
'9') {
2407 if (q > 100 || n > 3) {
2432 "subrequests cycle while processing \"%V\"", uri);
2448 if (sr->
ctx == NULL) {
2475 sr->spdy_stream = r->spdy_stream;
2489 "http subrequest \"%V?%V\"", uri, &sr->
args);
2561 "rewrite or internal redirection cycle "
2562 "while internally redirecting to \"%V\"", uri);
2579 "internal redirect: \"%V?%V\"", uri, &r->
args);
2591 #if (NGX_HTTP_CACHE)
2618 "rewrite or internal redirection cycle "
2619 "while redirect to named location \"%V\"", name);
2632 "test location: \"%V\"", &(*clcfp)->name);
2634 if (name->
len != (*clcfp)->name.len
2641 "using location: %V \"%V?%V\"",
2666 "could not find named location \"%V\"", name);
2688 if (cln->
data == NULL) {
2702 "http cleanup add: %p", cln);
2712 #if (NGX_HAVE_OPENAT)
2716 of->disable_symlinks = clcf->disable_symlinks;
2718 if (clcf->disable_symlinks_from == NULL) {
2735 if (from.
len == path->
len) {
2736 of->disable_symlinks = NGX_DISABLE_SYMLINKS_OFF;
2743 of->disable_symlinks_from = from.
len;
2750 of->disable_symlinks_from = from.
len - 1;
2767 if (headers == NULL) {
2768 return ngx_http_get_forwarded_addr_internal(r, addr, value->
data,
2769 value->
len, proxies,
2781 rc = ngx_http_get_forwarded_addr_internal(r, addr, h[i]->value.
data,
2807 u_char *xff,
size_t xfflen,
ngx_array_t *proxies,
int recursive)
2815 #if (NGX_HAVE_INET6)
2817 struct in6_addr *inaddr6;
2820 #if (NGX_SUPPRESS_WARN)
2822 #if (NGX_HAVE_INET6)
2827 family = addr->
sockaddr->sa_family;
2829 if (family == AF_INET) {
2830 inaddr = ((
struct sockaddr_in *) addr->
sockaddr)->sin_addr.s_addr;
2833 #if (NGX_HAVE_INET6)
2834 else if (family == AF_INET6) {
2835 inaddr6 = &((
struct sockaddr_in6 *) addr->
sockaddr)->sin6_addr;
2837 if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
2840 p = inaddr6->s6_addr;
2842 inaddr = p[12] << 24;
2843 inaddr += p[13] << 16;
2844 inaddr += p[14] << 8;
2847 inaddr = htonl(inaddr);
2852 for (cidr = proxies->
elts, i = 0; i < proxies->nelts; i++) {
2853 if (cidr[i].family != family) {
2859 #if (NGX_HAVE_INET6)
2861 for (n = 0; n < 16; n++) {
2862 if ((inaddr6->s6_addr[n] & cidr[i].
u.in6.mask.s6_addr[n])
2863 != cidr[i].
u.in6.addr.s6_addr[n])
2871 #if (NGX_HAVE_UNIX_DOMAIN)
2883 for (p = xff + xfflen - 1; p > xff; p--, xfflen--) {
2884 if (*p !=
' ' && *p !=
',') {
2889 for ( ; p > xff; p--) {
2890 if (*p ==
' ' || *p ==
',') {
2902 if (recursive && p > xff) {
2903 rc = ngx_http_get_forwarded_addr_internal(r, addr, xff, p - 1 - xff,
2932 struct sockaddr_in *sin;
2969 if (mconf == NULL) {
2978 if (mconf == NULL) {
2996 if (cscfp == NULL) {
3018 sin->sin_family = AF_INET;
3020 sin->sin_port = htons(80);
3022 sin->sin_port = htons((getuid() == 0) ? 80 : 8000);
3024 sin->sin_addr.s_addr = INADDR_ANY;
3026 lsopt.
socklen =
sizeof(
struct sockaddr_in);
3031 #if (NGX_HAVE_SETFIB)
3099 mod = value[1].
data;
3102 if (len == 1 && mod[0] ==
'=') {
3107 }
else if (len == 2 && mod[0] ==
'^' && mod[1] ==
'~') {
3112 }
else if (len == 1 && mod[0] ==
'~') {
3114 if (ngx_http_core_regex_location(cf, clcf, name, 0) !=
NGX_OK) {
3118 }
else if (len == 2 && mod[0] ==
'~' && mod[1] ==
'*') {
3120 if (ngx_http_core_regex_location(cf, clcf, name, 1) !=
NGX_OK) {
3126 "invalid location modifier \"%V\"", &value[1]);
3134 if (name->
data[0] ==
'=') {
3140 }
else if (name->
data[0] ==
'^' && name->
data[1] ==
'~') {
3146 }
else if (name->
data[0] ==
'~') {
3151 if (name->
data[0] ==
'*') {
3156 if (ngx_http_core_regex_location(cf, clcf, name, 1) !=
NGX_OK) {
3161 if (ngx_http_core_regex_location(cf, clcf, name, 0) !=
NGX_OK) {
3170 if (name->
data[0] ==
'@') {
3183 clcf->prev_location = pclcf;
3188 "location \"%V\" cannot be inside "
3189 "the exact location \"%V\"",
3196 "location \"%V\" cannot be inside "
3197 "the named location \"%V\"",
3204 "named location \"%V\" can be "
3205 "on the server level only",
3213 if (clcf->regex == NULL
3220 "location \"%V\" is outside location \"%V\"",
3256 #if (NGX_HAVE_CASELESS_FILESYSTEM)
3262 clcf->regex = ngx_http_regex_compile(cf, &rc);
3263 if (clcf->regex == NULL) {
3267 clcf->
name = *regex;
3274 "using regex \"%V\" requires PCRE library",
3290 if (clcf->
types == NULL) {
3292 if (clcf->
types == NULL) {
3298 cf->
handler = ngx_http_core_type;
3320 if (
ngx_strcmp(value[0].data,
"include") == 0) {
3323 "invalid number of arguments"
3324 " in \"include\" directive");
3332 if (content_type == NULL) {
3336 *content_type = value[0];
3344 if (
ngx_strcmp(value[i].data, type[n].key.data) == 0) {
3345 old = type[n].
value;
3346 type[n].
value = content_type;
3349 "duplicate extension \"%V\", "
3350 "content type: \"%V\", "
3351 "previous content type: \"%V\"",
3352 &value[i], content_type, old);
3363 type->
key = value[
i];
3365 type->
value = content_type;
3376 ngx_http_core_preconfiguration(
ngx_conf_t *cf)
3383 ngx_http_core_create_main_conf(
ngx_conf_t *cf)
3410 ngx_http_core_init_main_conf(
ngx_conf_t *cf,
void *conf)
3446 ngx_http_core_create_srv_conf(
ngx_conf_t *cf)
3481 ngx_http_core_merge_srv_conf(
ngx_conf_t *cf,
void *parent,
void *child)
3505 "the \"large_client_header_buffers\" size must be "
3506 "equal to or greater than \"connection_pool_size\"");
3538 if (name.
data[0] ==
'.') {
3554 ngx_http_core_create_loc_conf(
ngx_conf_t *cf)
3594 #if (NGX_HAVE_FILE_AIO)
3640 clcf->gzip_disable_msie6 = 3;
3641 #if (NGX_HTTP_DEGRADATION)
3642 clcf->gzip_disable_degradation = 3;
3646 #if (NGX_HAVE_OPENAT)
3660 {
ngx_string(
"html"), 0, &ngx_http_core_text_html_type },
3661 {
ngx_string(
"gif"), 0, &ngx_http_core_image_gif_type },
3662 {
ngx_string(
"jpg"), 0, &ngx_http_core_image_jpeg_type },
3668 ngx_http_core_merge_loc_conf(
ngx_conf_t *cf,
void *parent,
void *child)
3718 types_hash.
name =
"types_hash";
3729 if (conf->
types == NULL) {
3734 if (conf->
types == NULL) {
3736 if (conf->
types == NULL) {
3740 for (i = 0; ngx_http_core_default_types[
i].
key.
len; i++) {
3746 type->
key = ngx_http_core_default_types[
i].
key;
3749 ngx_http_core_default_types[i].
key.
len);
3750 type->
value = ngx_http_core_default_types[
i].
value;
3760 types_hash.
name =
"types_hash";
3813 #if (NGX_HAVE_FILE_AIO)
3866 &ngx_http_client_temp_path)
3914 if (conf->gzip_disable_msie6 == 3) {
3915 conf->gzip_disable_msie6 =
3916 (prev->gzip_disable_msie6 == 3) ? 0 : prev->gzip_disable_msie6;
3919 #if (NGX_HTTP_DEGRADATION)
3921 if (conf->gzip_disable_degradation == 3) {
3922 conf->gzip_disable_degradation =
3923 (prev->gzip_disable_degradation == 3) ?
3924 0 : prev->gzip_disable_degradation;
3930 #if (NGX_HAVE_OPENAT)
3932 NGX_DISABLE_SYMLINKS_OFF);
3934 prev->disable_symlinks_from, NULL);
3964 "%s in \"%V\" of the \"listen\" directive",
3979 #if (NGX_HAVE_SETFIB)
3983 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
3992 if (
ngx_strcmp(value[n].data,
"default_server") == 0
3993 ||
ngx_strcmp(value[n].data,
"default") == 0)
3999 if (
ngx_strcmp(value[n].data,
"bind") == 0) {
4005 #if (NGX_HAVE_SETFIB)
4006 if (
ngx_strncmp(value[n].data,
"setfib=", 7) == 0) {
4007 lsopt.setfib =
ngx_atoi(value[n].data + 7, value[n].len - 7);
4011 "invalid setfib \"%V\"", &value[n]);
4018 if (
ngx_strncmp(value[n].data,
"backlog=", 8) == 0) {
4025 "invalid backlog \"%V\"", &value[n]);
4032 if (
ngx_strncmp(value[n].data,
"rcvbuf=", 7) == 0) {
4033 size.
len = value[n].
len - 7;
4042 "invalid rcvbuf \"%V\"", &value[n]);
4049 if (
ngx_strncmp(value[n].data,
"sndbuf=", 7) == 0) {
4050 size.
len = value[n].
len - 7;
4059 "invalid sndbuf \"%V\"", &value[n]);
4066 if (
ngx_strncmp(value[n].data,
"accept_filter=", 14) == 0) {
4067 #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
4068 lsopt.accept_filter = (
char *) &value[n].data[14];
4073 "accept filters \"%V\" are not supported "
4074 "on this platform, ignored",
4080 if (
ngx_strcmp(value[n].data,
"deferred") == 0) {
4081 #if (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT)
4082 lsopt.deferred_accept = 1;
4087 "the deferred accept is not supported "
4088 "on this platform, ignored");
4093 if (
ngx_strncmp(value[n].data,
"ipv6only=o", 10) == 0) {
4094 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
4095 struct sockaddr *sa;
4099 if (sa->sa_family == AF_INET6) {
4101 if (
ngx_strcmp(&value[n].data[10],
"n") == 0) {
4104 }
else if (
ngx_strcmp(&value[n].data[10],
"ff") == 0) {
4109 "invalid ipv6only flags \"%s\"",
4119 "ipv6only is not supported "
4120 "on addr \"%s\", ignored", lsopt.
addr);
4126 "ipv6only is not supported "
4127 "on this platform");
4138 "the \"ssl\" parameter requires "
4139 "ngx_http_ssl_module");
4144 if (
ngx_strcmp(value[n].data,
"spdy") == 0) {
4150 "the \"spdy\" parameter requires "
4151 "ngx_http_spdy_module");
4156 if (
ngx_strncmp(value[n].data,
"so_keepalive=", 13) == 0) {
4158 if (
ngx_strcmp(&value[n].data[13],
"on") == 0) {
4161 }
else if (
ngx_strcmp(&value[n].data[13],
"off") == 0) {
4166 #if (NGX_HAVE_KEEPALIVE_TUNABLE)
4170 end = value[n].
data + value[n].
len;
4173 p = ngx_strlchr(s.
data, end,
':');
4182 if (lsopt.tcp_keepidle == (time_t)
NGX_ERROR) {
4183 goto invalid_so_keepalive;
4187 s.
data = (p < end) ? (p + 1) : end;
4189 p = ngx_strlchr(s.
data, end,
':');
4198 if (lsopt.tcp_keepintvl == (time_t)
NGX_ERROR) {
4199 goto invalid_so_keepalive;
4203 s.
data = (p < end) ? (p + 1) : end;
4210 goto invalid_so_keepalive;
4214 if (lsopt.tcp_keepidle == 0 && lsopt.tcp_keepintvl == 0
4215 && lsopt.tcp_keepcnt == 0)
4217 goto invalid_so_keepalive;
4225 "the \"so_keepalive\" parameter accepts "
4226 "only \"on\" or \"off\" on this platform");
4237 #if (NGX_HAVE_KEEPALIVE_TUNABLE)
4238 invalid_so_keepalive:
4241 "invalid so_keepalive value: \"%s\"",
4242 &value[n].data[13]);
4248 "invalid parameter \"%V\"", &value[n]);
4274 ch = value[
i].
data[0];
4276 if ((ch ==
'*' && (value[i].len < 3 || value[i].data[1] !=
'.'))
4277 || (ch ==
'.' && value[i].len < 2))
4280 "server name \"%V\" is invalid", &value[i]);
4286 "server name \"%V\" has suspicious symbols",
4300 if (
ngx_strcasecmp(value[i].data, (u_char *)
"$hostname") == 0) {
4304 sn->
name = value[
i];
4307 if (value[i].data[0] !=
'~') {
4318 if (value[i].len == 1) {
4320 "empty regex in server name \"%V\"", &value[i]);
4333 for (p = value[i].data; p < value[
i].
data + value[
i].
len; p++) {
4334 if (*p >=
'A' && *p <=
'Z') {
4340 sn->regex = ngx_http_regex_compile(cf, &rc);
4341 if (sn->regex == NULL) {
4345 sn->
name = value[
i];
4346 cscf->captures = (rc.
captures > 0);
4350 "using regex \"%V\" "
4351 "requires PCRE library", &value[i]);
4371 alias = (cmd->
name.
len ==
sizeof(
"alias") - 1) ? 1 : 0;
4375 if ((clcf->
alias != 0) == alias) {
4377 "\"%V\" directive is duplicate",
4381 "\"%V\" directive is duplicate, "
4382 "\"%s\" directive was specified earlier",
4383 &cmd->
name, clcf->
alias ?
"alias" :
"root");
4389 if (clcf->
named && alias) {
4391 "the \"alias\" directive cannot be used "
4392 "inside the named location");
4399 if (
ngx_strstr(value[1].data,
"$document_root")
4400 ||
ngx_strstr(value[1].data,
"${document_root}"))
4403 "the $document_root variable cannot be used "
4404 "in the \"%V\" directive",
4410 if (
ngx_strstr(value[1].data,
"$realpath_root")
4411 ||
ngx_strstr(value[1].data,
"${realpath_root}"))
4414 "the $realpath_root variable cannot be used "
4415 "in the \"%V\" directive",
4422 clcf->
root = value[1];
4440 if (alias && clcf->regex) {
4505 for (name = ngx_methods_names; name->
name; name++) {
4514 "invalid method \"%V\"", &value[i]);
4549 if (mconf == NULL) {
4589 return "is duplicate";
4601 return "invalid value";
4633 if (value[i].data[0] ==
'=') {
4636 "invalid value \"%V\"", &value[i]);
4640 if (value[i].len > 1) {
4641 overwrite =
ngx_atoi(&value[i].data[1], value[i].len - 1);
4645 "invalid value \"%V\"", &value[i]);
4686 for (i = 1; i < cf->
args->
nelts - n; i++) {
4696 "invalid value \"%V\"", &value[i]);
4702 "value \"%V\" must be between 300 and 599",
4709 if (overwrite == -1) {
4741 return "is duplicate";
4757 for (i = 0; i < cf->
args->
nelts - 1; i++) {
4759 tf[
i].
name = value[i + 1];
4761 if (tf[i].name.data[tf[i].
name.
len - 1] ==
'/') {
4790 if (tf[i - 1].name.data[0] ==
'=') {
4796 "invalid code \"%*s\"",
4797 tf[i - 1].name.len - 1, tf[i - 1].
name.
data);
4819 return "is duplicate";
4831 max =
ngx_atoi(value[i].data + 4, value[i].len - 4);
4839 if (
ngx_strncmp(value[i].data,
"inactive=", 9) == 0) {
4862 "invalid \"open_file_cache\" parameter \"%V\"",
4873 "\"open_file_cache\" must have the \"max\" parameter");
4894 return "is duplicate";
4899 if (
ngx_strcmp(value[1].data,
"stderr") == 0) {
4928 return "is duplicate";
4936 return "invalid value";
4946 return "invalid value";
4959 return "is duplicate";
4976 return "is duplicate";
5008 if (clcf->gzip_disable == NULL) {
5023 if (
ngx_strcmp(value[i].data,
"msie6") == 0) {
5024 clcf->gzip_disable_msie6 = 1;
5028 #if (NGX_HTTP_DEGRADATION)
5030 if (
ngx_strcmp(value[i].data,
"degradation") == 0) {
5031 clcf->gzip_disable_degradation = 1;
5063 if (
ngx_strcmp(value[i].data,
"msie6") == 0) {
5064 clcf->gzip_disable_msie6 = 1;
5068 #if (NGX_HTTP_DEGRADATION)
5070 if (
ngx_strcmp(value[i].data,
"degradation") == 0) {
5071 clcf->gzip_disable_degradation = 1;
5078 "without PCRE library \"gzip_disable\" supports "
5079 "builtin \"msie6\" and \"degradation\" mask only");
5092 #if (NGX_HAVE_OPENAT)
5104 return "is duplicate";
5112 clcf->disable_symlinks = NGX_DISABLE_SYMLINKS_OFF;
5116 if (
ngx_strcmp(value[i].data,
"if_not_owner") == 0) {
5117 clcf->disable_symlinks = NGX_DISABLE_SYMLINKS_NOTOWNER;
5122 clcf->disable_symlinks = NGX_DISABLE_SYMLINKS_ON;
5126 if (
ngx_strncmp(value[i].data,
"from=", 5) == 0) {
5150 "invalid parameter \"%V\"", &value[i]);
5156 "\"%V\" must have \"off\", \"on\" "
5157 "or \"if_not_owner\" parameter",
5163 clcf->disable_symlinks_from = NULL;
5169 "duplicate parameters \"%V %V\"",
5170 &value[1], &value[2]);
5174 if (clcf->disable_symlinks == NGX_DISABLE_SYMLINKS_OFF) {
5176 "\"from=\" cannot be used with \"off\" parameter");
5187 ngx_http_core_lowat_check(
ngx_conf_t *cf,
void *post,
void *data)
5194 "\"send_lowat\" must be less than %d "
5195 "(sysctl net.inet.tcp.sendspace)",
5201 #elif !(NGX_HAVE_SO_SNDLOWAT)
5205 "\"send_lowat\" is not supported, ignored");
5216 ngx_http_core_pool_size(
ngx_conf_t *cf,
void *post,
void *data)
5222 "the pool size must be no less than %uz",
5229 "the pool size must be a multiple of %uz",
5230 NGX_POOL_ALIGNMENT);