Mercurial > hg > nginx-vendor-1-0
comparison src/core/ngx_conf_file.c @ 324:f7cd062ee035 NGINX_0_6_6
nginx 0.6.6
*) Feature: the --sysconfdir=PATH option in configure.
*) Feature: named locations.
*) Feature: the $args variable can be set with the "set" directive.
*) Feature: the $is_args variable.
*) Bugfix: fair big weight upstream balancer.
*) Bugfix: if a client has closed connection to mail proxy then nginx
might not close connection to backend.
*) Bugfix: if the same host without specified port was used as backend
for HTTP and HTTPS, then nginx used only one port - 80 or 443.
*) Bugfix: fix building on Solaris/amd64 by Sun Studio 11 and early
versions; bug appeared in 0.6.4.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 30 Jul 2007 00:00:00 +0400 |
parents | 94e16de3c33f |
children | 3a91bfeffaba |
comparison
equal
deleted
inserted
replaced
323:7e977a664d91 | 324:f7cd062ee035 |
---|---|
639 value = cf->args->elts; | 639 value = cf->args->elts; |
640 file = value[1]; | 640 file = value[1]; |
641 | 641 |
642 ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data); | 642 ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data); |
643 | 643 |
644 if (ngx_conf_full_name(cf->cycle, &file) == NGX_ERROR) { | 644 if (ngx_conf_full_name(cf->cycle, &file, 1) == NGX_ERROR) { |
645 return NGX_CONF_ERROR; | 645 return NGX_CONF_ERROR; |
646 } | 646 } |
647 | 647 |
648 ngx_memzero(&gl, sizeof(ngx_glob_t)); | 648 ngx_memzero(&gl, sizeof(ngx_glob_t)); |
649 | 649 |
679 return rv; | 679 return rv; |
680 } | 680 } |
681 | 681 |
682 | 682 |
683 ngx_int_t | 683 ngx_int_t |
684 ngx_conf_full_name(ngx_cycle_t *cycle, ngx_str_t *name) | 684 ngx_conf_full_name(ngx_cycle_t *cycle, ngx_str_t *name, ngx_uint_t conf_prefix) |
685 { | 685 { |
686 u_char *p; | 686 size_t len; |
687 u_char *p, *prefix; | |
687 ngx_str_t old; | 688 ngx_str_t old; |
688 | 689 |
689 if (name->data[0] == '/') { | 690 if (name->data[0] == '/') { |
690 return NGX_OK; | 691 return NGX_OK; |
691 } | 692 } |
702 | 703 |
703 #endif | 704 #endif |
704 | 705 |
705 old = *name; | 706 old = *name; |
706 | 707 |
707 name->len = cycle->root.len + old.len; | 708 if (conf_prefix) { |
708 | 709 len = sizeof(NGX_CONF_PREFIX) - 1; |
710 prefix = (u_char *) NGX_CONF_PREFIX; | |
711 | |
712 } else { | |
713 len = cycle->root.len; | |
714 prefix = cycle->root.data; | |
715 } | |
716 | |
717 name->len = len + old.len; | |
709 name->data = ngx_palloc(cycle->pool, name->len + 1); | 718 name->data = ngx_palloc(cycle->pool, name->len + 1); |
710 if (name->data == NULL) { | 719 if (name->data == NULL) { |
711 return NGX_ERROR; | 720 return NGX_ERROR; |
712 } | 721 } |
713 | 722 |
714 p = ngx_cpymem(name->data, cycle->root.data, cycle->root.len), | 723 p = ngx_cpymem(name->data, prefix, len); |
715 ngx_cpystrn(p, old.data, old.len + 1); | 724 ngx_cpystrn(p, old.data, old.len + 1); |
716 | 725 |
717 return NGX_OK; | 726 return NGX_OK; |
718 } | 727 } |
719 | 728 |
732 #endif | 741 #endif |
733 | 742 |
734 if (name) { | 743 if (name) { |
735 full = *name; | 744 full = *name; |
736 | 745 |
737 if (ngx_conf_full_name(cycle, &full) == NGX_ERROR) { | 746 if (ngx_conf_full_name(cycle, &full, 0) == NGX_ERROR) { |
738 return NULL; | 747 return NULL; |
739 } | 748 } |
740 | 749 |
741 part = &cycle->open_files.part; | 750 part = &cycle->open_files.part; |
742 file = part->elts; | 751 file = part->elts; |