diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2021-05-06 02:22:03 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2021-05-06 02:22:03 +0300 |
commit | 4faa84085379346fa1cf322907a1f9b6a7fbd583 (patch) | |
tree | b71229d98bdc04e6224cd9d9a420275f64bee984 /src/http/modules/ngx_http_auth_basic_module.c | |
parent | f02e2a734ef472f0dcf83ab2e8ce96d1acead8a5 (diff) | |
download | nginx-4faa84085379346fa1cf322907a1f9b6a7fbd583.tar.gz nginx-4faa84085379346fa1cf322907a1f9b6a7fbd583.zip |
Changed complex value slots to use NGX_CONF_UNSET_PTR.
With this change, it is now possible to use ngx_conf_merge_ptr_value()
to merge complex values. This change follows much earlier changes in
ngx_conf_merge_ptr_value() and ngx_conf_set_str_array_slot()
in 1452:cd586e963db0 (0.6.10) and 1701:40d004d95d88 (0.6.22), and the
change in ngx_conf_set_keyval_slot() (7728:485dba3e2a01, 1.19.4).
To preserve compatibility with existing 3rd party modules, both NULL
and NGX_CONF_UNSET_PTR are accepted for now.
Diffstat (limited to 'src/http/modules/ngx_http_auth_basic_module.c')
-rw-r--r-- | src/http/modules/ngx_http_auth_basic_module.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/http/modules/ngx_http_auth_basic_module.c b/src/http/modules/ngx_http_auth_basic_module.c index ed9df3430..4e28b6ce6 100644 --- a/src/http/modules/ngx_http_auth_basic_module.c +++ b/src/http/modules/ngx_http_auth_basic_module.c @@ -357,6 +357,8 @@ ngx_http_auth_basic_create_loc_conf(ngx_conf_t *cf) return NULL; } + conf->realm = NGX_CONF_UNSET_PTR; + return conf; } @@ -367,9 +369,7 @@ ngx_http_auth_basic_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) ngx_http_auth_basic_loc_conf_t *prev = parent; ngx_http_auth_basic_loc_conf_t *conf = child; - if (conf->realm == NULL) { - conf->realm = prev->realm; - } + ngx_conf_merge_ptr_value(conf->realm, prev->realm, NULL); if (conf->user_file.value.data == NULL) { conf->user_file = prev->user_file; |