comparison src/http/ngx_http_variables.c @ 676:bfa81a0490a2 NGINX_1_3_1

nginx 1.3.1 *) Security: now nginx/Windows ignores trailing dot in URI path component, and does not allow URIs with ":$" in it. Thanks to Vladimir Kochetkov, Positive Research Center. *) Feature: the "proxy_pass", "fastcgi_pass", "scgi_pass", "uwsgi_pass" directives, and the "server" directive inside the "upstream" block, now support IPv6 addresses. *) Feature: the "resolver" directive now support IPv6 addresses and an optional port specification. *) Feature: the "least_conn" directive inside the "upstream" block. *) Feature: it is now possible to specify a weight for servers while using the "ip_hash" directive. *) Bugfix: a segmentation fault might occur in a worker process if the "image_filter" directive was used; the bug had appeared in 1.3.0. *) Bugfix: nginx could not be built with ngx_cpp_test_module; the bug had appeared in 1.1.12. *) Bugfix: access to variables from SSI and embedded perl module might not work after reconfiguration. Thanks to Yichun Zhang. *) Bugfix: in the ngx_http_xslt_filter_module. Thanks to Kuramoto Eiji. *) Bugfix: memory leak if $geoip_org variable was used. Thanks to Denis F. Latypoff. *) Bugfix: in the "proxy_cookie_domain" and "proxy_cookie_path" directives.
author Igor Sysoev <http://sysoev.ru>
date Tue, 05 Jun 2012 00:00:00 +0400
parents ad45b044f1e5
children 981b4c44593b
comparison
equal deleted inserted replaced
675:7052a9379344 676:bfa81a0490a2
2014 2014
2015 ngx_int_t 2015 ngx_int_t
2016 ngx_http_variables_add_core_vars(ngx_conf_t *cf) 2016 ngx_http_variables_add_core_vars(ngx_conf_t *cf)
2017 { 2017 {
2018 ngx_int_t rc; 2018 ngx_int_t rc;
2019 ngx_http_variable_t *v; 2019 ngx_http_variable_t *cv, *v;
2020 ngx_http_core_main_conf_t *cmcf; 2020 ngx_http_core_main_conf_t *cmcf;
2021 2021
2022 cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module); 2022 cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module);
2023 2023
2024 cmcf->variables_keys = ngx_pcalloc(cf->temp_pool, 2024 cmcf->variables_keys = ngx_pcalloc(cf->temp_pool,
2034 != NGX_OK) 2034 != NGX_OK)
2035 { 2035 {
2036 return NGX_ERROR; 2036 return NGX_ERROR;
2037 } 2037 }
2038 2038
2039 for (v = ngx_http_core_variables; v->name.len; v++) { 2039 for (cv = ngx_http_core_variables; cv->name.len; cv++) {
2040 v = ngx_palloc(cf->pool, sizeof(ngx_http_variable_t));
2041 if (v == NULL) {
2042 return NGX_ERROR;
2043 }
2044
2045 *v = *cv;
2046
2040 rc = ngx_hash_add_key(cmcf->variables_keys, &v->name, v, 2047 rc = ngx_hash_add_key(cmcf->variables_keys, &v->name, v,
2041 NGX_HASH_READONLY_KEY); 2048 NGX_HASH_READONLY_KEY);
2042 2049
2043 if (rc == NGX_OK) { 2050 if (rc == NGX_OK) {
2044 continue; 2051 continue;