Mercurial > hg > nginx
comparison src/http/modules/ngx_http_proxy_module.c @ 5040:05beaa2d87b3 stable-1.2
Merge of r4948, r4949, r4964, r4973, r5011: variables.
*) Allow the complex value to be defined as an empty string.
This makes conversion from strings to complex values possible
without the loss of functionality.
*) The "auth_basic" directive gained support of variables.
*) Fixed variable syntax checking in "set", "geo", "limit_conn_zone",
and "perl_set" directives.
*) Added checks that disallow adding a variable with an empty name.
Added variable name syntax checks to "geo" and "map" directives.
*) Variables $pipe, $request_length, $time_iso8601, and $time_local.
Log module counterparts are preserved for efficiency.
Based on patch by Kiril Kalchev.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sun, 10 Feb 2013 03:08:42 +0000 |
parents | 8036fc6af2df |
children | 30fe1b1acf93 |
comparison
equal
deleted
inserted
replaced
5039:b5601d23b61e | 5040:05beaa2d87b3 |
---|---|
834 key = ngx_array_push(&r->cache->keys); | 834 key = ngx_array_push(&r->cache->keys); |
835 if (key == NULL) { | 835 if (key == NULL) { |
836 return NGX_ERROR; | 836 return NGX_ERROR; |
837 } | 837 } |
838 | 838 |
839 if (plcf->cache_key.value.len) { | 839 if (plcf->cache_key.value.data) { |
840 | 840 |
841 if (ngx_http_complex_value(r, &plcf->cache_key, key) != NGX_OK) { | 841 if (ngx_http_complex_value(r, &plcf->cache_key, key) != NGX_OK) { |
842 return NGX_ERROR; | 842 return NGX_ERROR; |
843 } | 843 } |
844 | 844 |
3916 ngx_str_t *value; | 3916 ngx_str_t *value; |
3917 ngx_http_compile_complex_value_t ccv; | 3917 ngx_http_compile_complex_value_t ccv; |
3918 | 3918 |
3919 value = cf->args->elts; | 3919 value = cf->args->elts; |
3920 | 3920 |
3921 if (plcf->cache_key.value.len) { | 3921 if (plcf->cache_key.value.data) { |
3922 return "is duplicate"; | 3922 return "is duplicate"; |
3923 } | 3923 } |
3924 | 3924 |
3925 ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t)); | 3925 ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t)); |
3926 | 3926 |