diff src/http/ngx_http_variables.c @ 519:12234c998d83 release-0.1.34

nginx-0.1.34-RELEASE import *) Bugfix: the worker process may got caught in an endless loop if the big response part were include by SSI. *) Bugfix: the variables set by the "set" directive were not available in SSI. *) Feature: the "autoindex_localtime" directive. *) Bugfix: the empty value of the "proxy_set_header" directive forbids the client request header line passing.
author Igor Sysoev <igor@sysoev.ru>
date Thu, 26 May 2005 18:12:40 +0000
parents 417a087c9c4d
children 7fa11e5c6e96
line wrap: on
line diff
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -276,7 +276,12 @@ ngx_http_get_variable(ngx_http_request_t
     if (v[key].name.len == name->len
         && ngx_strncmp(v[key].name.data, name->data, name->len) == 0)
     {
-        return v[key].handler(r, v[key].data);
+        if (v[key].flags & NGX_HTTP_VAR_INDEXED) {
+            return ngx_http_get_indexed_variable(r, v[key].data);
+
+        } else {
+            return v[key].handler(r, v[key].data);
+        }
     }
 
     if (ngx_strncmp(name->data, "http_", 5) == 0) {
@@ -701,7 +706,7 @@ ngx_http_variables_init_vars(ngx_conf_t 
             {
                 v[i].handler = av[n].handler;
                 v[i].data = av[n].data;
-                v[i].flags = av[n].flags;
+                v[i].flags = av[n].flags | NGX_HTTP_VAR_INDEXED;
 
                 goto next;
             }