diff options
| author | NGINX team <nginx@nginx.org> | 2012-06-05 14:10:19 +0000 |
|---|---|---|
| committer | Jon Kolb <jon@b0g.us> | 2012-06-05 14:10:19 +0000 |
| commit | 35bc6662c0ab8179a462a4d2d45589d982121a06 (patch) | |
| tree | 90895e3cdad0ef39b0e251a775f6129863141612 /src/http/ngx_http_variables.c | |
| parent | 3405367233d76421b59a6826b4f1ee651a816482 (diff) | |
| download | nginx-35bc6662c0ab8179a462a4d2d45589d982121a06.tar.gz | |
Changes with nginx 1.3.1 05 Jun 2012v1.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.
Diffstat (limited to 'src/http/ngx_http_variables.c')
| -rw-r--r-- | src/http/ngx_http_variables.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c index 949cef910..d9633990c 100644 --- a/src/http/ngx_http_variables.c +++ b/src/http/ngx_http_variables.c @@ -2016,7 +2016,7 @@ ngx_int_t ngx_http_variables_add_core_vars(ngx_conf_t *cf) { ngx_int_t rc; - ngx_http_variable_t *v; + ngx_http_variable_t *cv, *v; ngx_http_core_main_conf_t *cmcf; cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module); @@ -2036,7 +2036,14 @@ ngx_http_variables_add_core_vars(ngx_conf_t *cf) return NGX_ERROR; } - for (v = ngx_http_core_variables; v->name.len; v++) { + for (cv = ngx_http_core_variables; cv->name.len; cv++) { + v = ngx_palloc(cf->pool, sizeof(ngx_http_variable_t)); + if (v == NULL) { + return NGX_ERROR; + } + + *v = *cv; + rc = ngx_hash_add_key(cmcf->variables_keys, &v->name, v, NGX_HASH_READONLY_KEY); |
