mirror of https://github.com/nginx/nginx
Merge 82736dbad9 into c70457482c
This commit is contained in:
commit
476b1491ab
|
|
@ -405,6 +405,7 @@ ngx_http_auth_basic_user_file(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||||
|
|
||||||
ngx_str_t *value;
|
ngx_str_t *value;
|
||||||
ngx_http_compile_complex_value_t ccv;
|
ngx_http_compile_complex_value_t ccv;
|
||||||
|
ngx_file_info_t fi;
|
||||||
|
|
||||||
if (alcf->user_file != NGX_CONF_UNSET_PTR) {
|
if (alcf->user_file != NGX_CONF_UNSET_PTR) {
|
||||||
return "is duplicate";
|
return "is duplicate";
|
||||||
|
|
@ -429,5 +430,13 @@ ngx_http_auth_basic_user_file(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||||
return NGX_CONF_ERROR;
|
return NGX_CONF_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (alcf->user_file->lengths == NULL &&
|
||||||
|
ngx_file_info(alcf->user_file->value.data, &fi)
|
||||||
|
== NGX_FILE_ERROR) {
|
||||||
|
ngx_conf_log_error(NGX_LOG_WARN, cf, ngx_errno,
|
||||||
|
ngx_file_info_n " \"%s\" failed",
|
||||||
|
alcf->user_file->value.data);
|
||||||
|
}
|
||||||
|
|
||||||
return NGX_CONF_OK;
|
return NGX_CONF_OK;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue