comparison src/core/ngx_conf_file.c @ 4598:01a21ee8f8bb

Don't silently ignore the last line of configuration file that consists solely of one unterminated token (inspired by #150).
author Ruslan Ermilov <ru@nginx.com>
date Wed, 18 Apr 2012 13:30:43 +0000
parents 834049edae24
children 4c36e15651f7
comparison
equal deleted inserted replaced
4597:4be36d5e78ae 4598:01a21ee8f8bb
463 463
464 if (b->pos >= b->last) { 464 if (b->pos >= b->last) {
465 465
466 if (cf->conf_file->file.offset >= file_size) { 466 if (cf->conf_file->file.offset >= file_size) {
467 467
468 if (cf->args->nelts > 0) { 468 if (cf->args->nelts > 0 || !last_space) {
469 469
470 if (cf->conf_file->file.fd == NGX_INVALID_FILE) { 470 if (cf->conf_file->file.fd == NGX_INVALID_FILE) {
471 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 471 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
472 "unexpected end of parameter, " 472 "unexpected end of parameter, "
473 "expecting \";\""); 473 "expecting \";\"");