# HG changeset patch # User Ruslan Ermilov # Date 1334755843 0 # Node ID 01a21ee8f8bbbdeaffa1b3734b30b90d64454acd # Parent 4be36d5e78aea7d7b9c7dd26fa10ea64ace28490 Don't silently ignore the last line of configuration file that consists solely of one unterminated token (inspired by #150). diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c --- 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,