Mercurial > hg > nginx-vendor-current
comparison src/http/ngx_http_core_module.c @ 654:753f505670e0 NGINX_1_1_11
nginx 1.1.11
*) Feature: the "so_keepalive" parameter of the "listen" directive.
Thanks to Vsevolod Stakhov.
*) Feature: the "if_not_empty" parameter of the
"fastcgi/scgi/uwsgi_param" directives.
*) Feature: the $https variable.
*) Feature: the "proxy_redirect" directive supports variables in the
first parameter.
*) Feature: the "proxy_redirect" directive supports regular expressions.
*) Bugfix: the $sent_http_cache_control variable might contain a wrong
value if the "expires" directive was used.
Thanks to Yichun Zhang.
*) Bugfix: the "read_ahead" directive might not work combined with
"try_files" and "open_file_cache".
*) Bugfix: a segmentation fault might occur in a worker process if small
time was used in the "inactive" parameter of the "proxy_cache_path"
directive.
*) Bugfix: responses from cache might hang.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 12 Dec 2011 00:00:00 +0400 |
parents | 4d05413aebad |
children | 9d21dad0b5a1 |
comparison
equal
deleted
inserted
replaced
653:8c96af2112c1 | 654:753f505670e0 |
---|---|
1287 return NGX_OK; | 1287 return NGX_OK; |
1288 } | 1288 } |
1289 | 1289 |
1290 ngx_memzero(&of, sizeof(ngx_open_file_info_t)); | 1290 ngx_memzero(&of, sizeof(ngx_open_file_info_t)); |
1291 | 1291 |
1292 of.read_ahead = clcf->read_ahead; | |
1292 of.directio = clcf->directio; | 1293 of.directio = clcf->directio; |
1293 of.valid = clcf->open_file_cache_valid; | 1294 of.valid = clcf->open_file_cache_valid; |
1294 of.min_uses = clcf->open_file_cache_min_uses; | 1295 of.min_uses = clcf->open_file_cache_min_uses; |
1295 of.test_only = 1; | 1296 of.test_only = 1; |
1296 of.errors = clcf->open_file_cache_errors; | 1297 of.errors = clcf->open_file_cache_errors; |
3813 "ngx_http_ssl_module"); | 3814 "ngx_http_ssl_module"); |
3814 return NGX_CONF_ERROR; | 3815 return NGX_CONF_ERROR; |
3815 #endif | 3816 #endif |
3816 } | 3817 } |
3817 | 3818 |
3819 if (ngx_strncmp(value[n].data, "so_keepalive=", 13) == 0) { | |
3820 | |
3821 if (ngx_strcmp(&value[n].data[13], "on") == 0) { | |
3822 lsopt.so_keepalive = 1; | |
3823 | |
3824 } else if (ngx_strcmp(&value[n].data[13], "off") == 0) { | |
3825 lsopt.so_keepalive = 2; | |
3826 | |
3827 } else { | |
3828 | |
3829 #if (NGX_HAVE_KEEPALIVE_TUNABLE) | |
3830 u_char *p, *end; | |
3831 ngx_str_t s; | |
3832 | |
3833 end = value[n].data + value[n].len; | |
3834 s.data = value[n].data + 13; | |
3835 | |
3836 p = ngx_strlchr(s.data, end, ':'); | |
3837 if (p == NULL) { | |
3838 p = end; | |
3839 } | |
3840 | |
3841 if (p > s.data) { | |
3842 s.len = p - s.data; | |
3843 | |
3844 lsopt.tcp_keepidle = ngx_parse_time(&s, 1); | |
3845 if (lsopt.tcp_keepidle == NGX_ERROR) { | |
3846 goto invalid_so_keepalive; | |
3847 } | |
3848 } | |
3849 | |
3850 s.data = (p < end) ? (p + 1) : end; | |
3851 | |
3852 p = ngx_strlchr(s.data, end, ':'); | |
3853 if (p == NULL) { | |
3854 p = end; | |
3855 } | |
3856 | |
3857 if (p > s.data) { | |
3858 s.len = p - s.data; | |
3859 | |
3860 lsopt.tcp_keepintvl = ngx_parse_time(&s, 1); | |
3861 if (lsopt.tcp_keepintvl == NGX_ERROR) { | |
3862 goto invalid_so_keepalive; | |
3863 } | |
3864 } | |
3865 | |
3866 s.data = (p < end) ? (p + 1) : end; | |
3867 | |
3868 if (s.data < end) { | |
3869 s.len = end - s.data; | |
3870 | |
3871 lsopt.tcp_keepcnt = ngx_atoi(s.data, s.len); | |
3872 if (lsopt.tcp_keepcnt == NGX_ERROR) { | |
3873 goto invalid_so_keepalive; | |
3874 } | |
3875 } | |
3876 | |
3877 if (lsopt.tcp_keepidle == 0 && lsopt.tcp_keepintvl == 0 | |
3878 && lsopt.tcp_keepcnt == 0) | |
3879 { | |
3880 goto invalid_so_keepalive; | |
3881 } | |
3882 | |
3883 lsopt.so_keepalive = 1; | |
3884 | |
3885 #else | |
3886 | |
3887 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | |
3888 "the \"so_keepalive\" parameter accepts " | |
3889 "only \"on\" or \"off\" on this platform"); | |
3890 return NGX_CONF_ERROR; | |
3891 | |
3892 #endif | |
3893 } | |
3894 | |
3895 lsopt.set = 1; | |
3896 lsopt.bind = 1; | |
3897 | |
3898 continue; | |
3899 | |
3900 #if (NGX_HAVE_KEEPALIVE_TUNABLE) | |
3901 invalid_so_keepalive: | |
3902 | |
3903 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | |
3904 "invalid so_keepalive value: \"%s\"", | |
3905 &value[n].data[13]); | |
3906 return NGX_CONF_ERROR; | |
3907 #endif | |
3908 } | |
3909 | |
3818 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 3910 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
3819 "invalid parameter \"%V\"", &value[n]); | 3911 "invalid parameter \"%V\"", &value[n]); |
3820 return NGX_CONF_ERROR; | 3912 return NGX_CONF_ERROR; |
3821 } | 3913 } |
3822 | 3914 |