comparison 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
comparison
equal deleted inserted replaced
518:eeee5e6f5c48 519:12234c998d83
274 v = (ngx_http_variable_t *) cmcf->variables_hash.buckets; 274 v = (ngx_http_variable_t *) cmcf->variables_hash.buckets;
275 275
276 if (v[key].name.len == name->len 276 if (v[key].name.len == name->len
277 && ngx_strncmp(v[key].name.data, name->data, name->len) == 0) 277 && ngx_strncmp(v[key].name.data, name->data, name->len) == 0)
278 { 278 {
279 return v[key].handler(r, v[key].data); 279 if (v[key].flags & NGX_HTTP_VAR_INDEXED) {
280 return ngx_http_get_indexed_variable(r, v[key].data);
281
282 } else {
283 return v[key].handler(r, v[key].data);
284 }
280 } 285 }
281 286
282 if (ngx_strncmp(name->data, "http_", 5) == 0) { 287 if (ngx_strncmp(name->data, "http_", 5) == 0) {
283 return ngx_http_variable_unknown_header(r, (uintptr_t) name); 288 return ngx_http_variable_unknown_header(r, (uintptr_t) name);
284 } 289 }
699 && ngx_strncmp(v[i].name.data, av[n].name.data, v[i].name.len) 704 && ngx_strncmp(v[i].name.data, av[n].name.data, v[i].name.len)
700 == 0) 705 == 0)
701 { 706 {
702 v[i].handler = av[n].handler; 707 v[i].handler = av[n].handler;
703 v[i].data = av[n].data; 708 v[i].data = av[n].data;
704 v[i].flags = av[n].flags; 709 v[i].flags = av[n].flags | NGX_HTTP_VAR_INDEXED;
705 710
706 goto next; 711 goto next;
707 } 712 }
708 } 713 }
709 714