From 73fb7e878fac4ba302479e57554f2f688e306361 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Thu, 6 Dec 2012 23:03:53 +0000 Subject: 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. --- src/http/modules/ngx_http_auth_basic_module.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/http/modules/ngx_http_auth_basic_module.c') diff --git a/src/http/modules/ngx_http_auth_basic_module.c b/src/http/modules/ngx_http_auth_basic_module.c index ec3b1cf95..285fb7693 100644 --- a/src/http/modules/ngx_http_auth_basic_module.c +++ b/src/http/modules/ngx_http_auth_basic_module.c @@ -117,7 +117,7 @@ ngx_http_auth_basic_handler(ngx_http_request_t *r) alcf = ngx_http_get_module_loc_conf(r, ngx_http_auth_basic_module); - if (alcf->realm.len == 0 || alcf->user_file.value.len == 0) { + if (alcf->realm.len == 0 || alcf->user_file.value.data == NULL) { return NGX_DECLINED; } @@ -390,7 +390,7 @@ ngx_http_auth_basic_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) conf->realm = prev->realm; } - if (conf->user_file.value.len == 0) { + if (conf->user_file.value.data == NULL) { conf->user_file = prev->user_file; } @@ -456,7 +456,7 @@ ngx_http_auth_basic_user_file(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ngx_str_t *value; ngx_http_compile_complex_value_t ccv; - if (alcf->user_file.value.len) { + if (alcf->user_file.value.data) { return "is duplicate"; } -- cgit