Mercurial > hg > nginx
diff src/http/ngx_http_script.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 | 972642646f06 |
children | 12dd27b74117 |
line wrap: on
line diff
--- a/src/http/ngx_http_script.c +++ b/src/http/ngx_http_script.c @@ -114,11 +114,6 @@ ngx_http_compile_complex_value(ngx_http_ v = ccv->value; - if (v->len == 0) { - ngx_conf_log_error(NGX_LOG_EMERG, ccv->cf, 0, "empty parameter"); - return NGX_ERROR; - } - nv = 0; nc = 0; @@ -133,8 +128,9 @@ ngx_http_compile_complex_value(ngx_http_ } } - if (v->data[0] != '$' && (ccv->conf_prefix || ccv->root_prefix)) { - + if ((v->len == 0 || v->data[0] != '$') + && (ccv->conf_prefix || ccv->root_prefix)) + { if (ngx_conf_full_name(ccv->cf->cycle, v, ccv->conf_prefix) != NGX_OK) { return NGX_ERROR; }