From e9a7f4f5f6c2f95e582d1b498b6056a2309da0fa Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Wed, 18 Apr 2012 13:30:43 +0000 Subject: Don't silently ignore the last line of configuration file that consists solely of one unterminated token (inspired by #150). --- src/core/ngx_conf_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/ngx_conf_file.c') diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c index bb39f4269..892fa4719 100644 --- a/src/core/ngx_conf_file.c +++ b/src/core/ngx_conf_file.c @@ -465,7 +465,7 @@ ngx_conf_read_token(ngx_conf_t *cf) 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) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, -- cgit v1.2.3