[nginx] svn commit: r4599 - trunk/src/core

ru at nginx.com ru at nginx.com
Wed Apr 18 13:30:44 UTC 2012


Author: ru
Date: 2012-04-18 13:30:43 +0000 (Wed, 18 Apr 2012)
New Revision: 4599
URL: http://trac.nginx.org/nginx/changeset/4599/nginx

Log:
Don't silently ignore the last line of configuration file that
consists solely of one unterminated token (inspired by #150).


Modified:
   trunk/src/core/ngx_conf_file.c

Modified: trunk/src/core/ngx_conf_file.c
===================================================================
--- trunk/src/core/ngx_conf_file.c	2012-04-17 09:13:58 UTC (rev 4598)
+++ trunk/src/core/ngx_conf_file.c	2012-04-18 13:30:43 UTC (rev 4599)
@@ -465,7 +465,7 @@
 
             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,



More information about the nginx-devel mailing list