Don't silently ignore the last line of configuration file that

consists solely of one unterminated token (inspired by #150).
This commit is contained in:
Ruslan Ermilov 2012-04-18 13:30:43 +00:00
parent 0abb0bce5f
commit e9a7f4f5f6

View File

@ -465,7 +465,7 @@ ngx_conf_read_token(ngx_conf_t *cf)
if (cf->conf_file->file.offset >= file_size) { if (cf->conf_file->file.offset >= file_size) {
if (cf->args->nelts > 0) { if (cf->args->nelts > 0 || !last_space) {
if (cf->conf_file->file.fd == NGX_INVALID_FILE) { if (cf->conf_file->file.fd == NGX_INVALID_FILE) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,