Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_proxy_module.c @ 4947:4251e72b8bb4
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.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 06 Dec 2012 23:03:53 +0000 |
parents | 93294110728f |
children | 13a5202b6b4b |
comparison
equal
deleted
inserted
replaced
4946:2570296374b4 | 4947:4251e72b8bb4 |
---|---|
835 key = ngx_array_push(&r->cache->keys); | 835 key = ngx_array_push(&r->cache->keys); |
836 if (key == NULL) { | 836 if (key == NULL) { |
837 return NGX_ERROR; | 837 return NGX_ERROR; |
838 } | 838 } |
839 | 839 |
840 if (plcf->cache_key.value.len) { | 840 if (plcf->cache_key.value.data) { |
841 | 841 |
842 if (ngx_http_complex_value(r, &plcf->cache_key, key) != NGX_OK) { | 842 if (ngx_http_complex_value(r, &plcf->cache_key, key) != NGX_OK) { |
843 return NGX_ERROR; | 843 return NGX_ERROR; |
844 } | 844 } |
845 | 845 |
3649 ngx_str_t *value; | 3649 ngx_str_t *value; |
3650 ngx_http_compile_complex_value_t ccv; | 3650 ngx_http_compile_complex_value_t ccv; |
3651 | 3651 |
3652 value = cf->args->elts; | 3652 value = cf->args->elts; |
3653 | 3653 |
3654 if (plcf->cache_key.value.len) { | 3654 if (plcf->cache_key.value.data) { |
3655 return "is duplicate"; | 3655 return "is duplicate"; |
3656 } | 3656 } |
3657 | 3657 |
3658 ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t)); | 3658 ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t)); |
3659 | 3659 |