Mercurial > hg > nginx
diff src/http/modules/ngx_http_sub_filter_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 | 4a18bf1833a9 |
children | 4c1a604b0285 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_sub_filter_module.c +++ b/src/http/modules/ngx_http_sub_filter_module.c @@ -628,7 +628,7 @@ ngx_http_sub_filter(ngx_conf_t *cf, ngx_ ngx_str_t *value; ngx_http_compile_complex_value_t ccv; - if (slcf->match.len) { + if (slcf->match.data) { return "is duplicate"; } @@ -688,7 +688,7 @@ ngx_http_sub_merge_conf(ngx_conf_t *cf, ngx_conf_merge_value(conf->once, prev->once, 1); ngx_conf_merge_str_value(conf->match, prev->match, ""); - if (conf->value.value.len == 0) { + if (conf->value.value.data == NULL) { conf->value = prev->value; }