aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_script.c
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2012-12-06 23:03:53 +0000
committerRuslan Ermilov <ru@nginx.com>2012-12-06 23:03:53 +0000
commit73fb7e878fac4ba302479e57554f2f688e306361 (patch)
tree63e8399b962d4d4aec21bab29fbc5b6c8d4b30c2 /src/http/ngx_http_script.c
parent8e8201486cb52e929feb16446406253dfbe33e99 (diff)
downloadnginx-73fb7e878fac4ba302479e57554f2f688e306361.tar.gz
nginx-73fb7e878fac4ba302479e57554f2f688e306361.zip
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.
Diffstat (limited to 'src/http/ngx_http_script.c')
-rw-r--r--src/http/ngx_http_script.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c
index e214519fc..54d019589 100644
--- 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_compile_complex_value_t *ccv)
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_compile_complex_value_t *ccv)
}
}
- 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;
}