Mercurial > hg > nginx-vendor-0-6
comparison src/core/ngx_conf_file.c @ 238:a528ae0fe909 NGINX_0_4_4
nginx 0.4.4
*) Feature: the $scheme variable.
*) Feature: the "expires" directive supports the "max" parameter.
*) Feature: the "include" directive supports the "*" mask.
Thanks to Jonathan Dance.
*) Bugfix: the "return" directive always overrode the "error_page"
response code redirected by the "error_page" directive.
*) Bugfix: a segmentation fault occurred if zero-length body was in PUT
method.
*) Bugfix: the redirect was changed incorrectly if the variables were
used in the "proxy_redirect" directive.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 02 Oct 2006 00:00:00 +0400 |
parents | 56688ed172c8 |
children | 29a6403156b0 |
comparison
equal
deleted
inserted
replaced
237:302a8e8b4ae7 | 238:a528ae0fe909 |
---|---|
648 | 648 |
649 | 649 |
650 static char * | 650 static char * |
651 ngx_conf_include(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) | 651 ngx_conf_include(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) |
652 { | 652 { |
653 ngx_str_t *value, file; | 653 char *rv; |
654 ngx_int_t n; | |
655 ngx_str_t *value, file; | |
656 ngx_glob_t gl; | |
654 | 657 |
655 value = cf->args->elts; | 658 value = cf->args->elts; |
656 file = value[1]; | 659 file = value[1]; |
657 | 660 |
661 ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data); | |
662 | |
658 if (ngx_conf_full_name(cf->cycle, &file) == NGX_ERROR) { | 663 if (ngx_conf_full_name(cf->cycle, &file) == NGX_ERROR) { |
659 return NGX_CONF_ERROR; | 664 return NGX_CONF_ERROR; |
660 } | 665 } |
661 | 666 |
662 ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data); | 667 ngx_memzero(&gl, sizeof(ngx_glob_t)); |
663 | 668 |
664 return ngx_conf_parse(cf, &file); | 669 gl.pattern = file.data; |
670 gl.log = cf->log; | |
671 | |
672 if (ngx_open_glob(&gl) != NGX_OK) { | |
673 ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno, | |
674 ngx_open_glob_n " \"%s\" failed", file.data); | |
675 return NGX_CONF_ERROR; | |
676 } | |
677 | |
678 rv = NGX_CONF_OK; | |
679 | |
680 for ( ;; ) { | |
681 n = ngx_read_glob(&gl, &file); | |
682 | |
683 if (n != NGX_OK) { | |
684 break; | |
685 } | |
686 | |
687 ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data); | |
688 | |
689 rv = ngx_conf_parse(cf, &file); | |
690 | |
691 if (rv != NGX_CONF_OK) { | |
692 break; | |
693 } | |
694 } | |
695 | |
696 ngx_close_glob(&gl); | |
697 | |
698 return rv; | |
665 } | 699 } |
666 | 700 |
667 | 701 |
668 ngx_int_t | 702 ngx_int_t |
669 ngx_conf_full_name(ngx_cycle_t *cycle, ngx_str_t *name) | 703 ngx_conf_full_name(ngx_cycle_t *cycle, ngx_str_t *name) |