diff options
author | Ruslan Ermilov <ru@nginx.com> | 2012-04-18 17:30:43 +0400 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2012-04-18 17:30:43 +0400 |
commit | e9a7f4f5f6c2f95e582d1b498b6056a2309da0fa (patch) | |
tree | 53d81346077676c2f99901c939386ebd7d2702be /src/core/ngx_conf_file.c | |
parent | 0abb0bce5f297546f8f982677707fb33dadb96d8 (diff) |
Don't silently ignore the last line of configuration file that
consists solely of one unterminated token (inspired by #150).
Diffstat (limited to 'src/core/ngx_conf_file.c')
-rw-r--r-- | src/core/ngx_conf_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, |