Mercurial > hg > nginx-vendor-1-0
comparison src/http/ngx_http_variables.c @ 568:566e105a89f1 NGINX_0_8_36
nginx 0.8.36
*) Bugfix: the ngx_http_dav_module handled incorrectly the DELETE,
COPY, and MOVE methods for symlinks.
*) Bugfix: values of the $query_string, $arg_..., etc. variables cached
in main request were used by the SSI module in subrequests.
*) Bugfix: a variable value was repeatedly encoded after each an "echo"
SSI-command output; the bug had appeared in 0.6.14.
*) Bugfix: a worker process hung if a FIFO file was requested.
Thanks to Vicente Aguilar and Maxim Dounin.
*) Bugfix: OpenSSL-1.0.0 compatibility on 64-bit Linux.
Thanks to Maxim Dounin.
*) Bugfix: nginx could not be built --without-http-cache; the bug had
appeared in 0.8.35.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 22 Apr 2010 00:00:00 +0400 |
parents | da3c99095432 |
children | 8246d8a2c2be |
comparison
equal
deleted
inserted
replaced
567:a49f5d0aff01 | 568:566e105a89f1 |
---|---|
439 return ngx_http_get_indexed_variable(r, index); | 439 return ngx_http_get_indexed_variable(r, index); |
440 } | 440 } |
441 | 441 |
442 | 442 |
443 ngx_http_variable_value_t * | 443 ngx_http_variable_value_t * |
444 ngx_http_get_variable(ngx_http_request_t *r, ngx_str_t *name, ngx_uint_t key, | 444 ngx_http_get_variable(ngx_http_request_t *r, ngx_str_t *name, ngx_uint_t key) |
445 ngx_uint_t nowarn) | |
446 { | 445 { |
447 ngx_http_variable_t *v; | 446 ngx_http_variable_t *v; |
448 ngx_http_variable_value_t *vv; | 447 ngx_http_variable_value_t *vv; |
449 ngx_http_core_main_conf_t *cmcf; | 448 ngx_http_core_main_conf_t *cmcf; |
450 | 449 |
452 | 451 |
453 v = ngx_hash_find(&cmcf->variables_hash, key, name->data, name->len); | 452 v = ngx_hash_find(&cmcf->variables_hash, key, name->data, name->len); |
454 | 453 |
455 if (v) { | 454 if (v) { |
456 if (v->flags & NGX_HTTP_VAR_INDEXED) { | 455 if (v->flags & NGX_HTTP_VAR_INDEXED) { |
457 return ngx_http_get_indexed_variable(r, v->index); | 456 return ngx_http_get_flushed_variable(r, v->index); |
458 | 457 |
459 } else { | 458 } else { |
460 | 459 |
461 vv = ngx_palloc(r->pool, sizeof(ngx_http_variable_value_t)); | 460 vv = ngx_palloc(r->pool, sizeof(ngx_http_variable_value_t)); |
462 | 461 |
523 | 522 |
524 return NULL; | 523 return NULL; |
525 } | 524 } |
526 | 525 |
527 vv->not_found = 1; | 526 vv->not_found = 1; |
528 | |
529 if (nowarn == 0) { | |
530 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | |
531 "unknown \"%V\" variable", name); | |
532 } | |
533 | 527 |
534 return vv; | 528 return vv; |
535 } | 529 } |
536 | 530 |
537 | 531 |
1935 } | 1929 } |
1936 | 1930 |
1937 if (ngx_strncmp(v[i].name.data, "arg_", 4) == 0) { | 1931 if (ngx_strncmp(v[i].name.data, "arg_", 4) == 0) { |
1938 v[i].get_handler = ngx_http_variable_argument; | 1932 v[i].get_handler = ngx_http_variable_argument; |
1939 v[i].data = (uintptr_t) &v[i].name; | 1933 v[i].data = (uintptr_t) &v[i].name; |
1934 v[i].flags = NGX_HTTP_VAR_NOCACHEABLE; | |
1940 | 1935 |
1941 continue; | 1936 continue; |
1942 } | 1937 } |
1943 | 1938 |
1944 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, | 1939 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, |