Mercurial > hg > nginx-vendor-0-5
comparison src/http/ngx_http_core_module.c @ 326:f70f2f565fe0 NGINX_0_5_33
nginx 0.5.33
*) Change: now by default the "echo" SSI command uses entity encoding.
*) Feature: the "encoding" parameter in the "echo" SSI command.
*) Change: mail proxy was split on three modules: pop3, imap and smtp.
*) Feature: the --without-mail_pop3_module, --without-mail_imap_module,
and --without-mail_smtp_module configuration parameters.
*) Feature: the "smtp_greeting_delay" and "smtp_client_buffer"
directives of the ngx_mail_smtp_module.
*) Feature: the "server_name" and "valid_referers" directives support
regular expressions.
*) Feature: the "server_name", "map", and "valid_referers" directives
support the "www.example.*" wildcards.
*) Bugfix: sub_filter did not work with empty substitution.
*) Bugfix: in sub_filter parsing.
*) Bugfix: a worker process may got caught in an endless loop, if the
memcached was used.
*) Bugfix: nginx supported low case only "close" and "keep-alive"
values in the "Connection" request header line; bug appeared in
0.5.32.
*) Bugfix: nginx could not start on Solaris if the shared PCRE library
located in non-standard place was used.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 07 Nov 2007 00:00:00 +0300 |
parents | 7cf404023f50 |
children | 26ff8d6b618d |
comparison
equal
deleted
inserted
replaced
325:5bb1b28ddeaa | 326:f70f2f565fe0 |
---|---|
875 | 875 |
876 if (r->uri.data[r->uri.len - 1] == '/' && !r->zero_in_uri) { | 876 if (r->uri.data[r->uri.len - 1] == '/' && !r->zero_in_uri) { |
877 | 877 |
878 if (ngx_http_map_uri_to_path(r, &path, &root, 0) != NULL) { | 878 if (ngx_http_map_uri_to_path(r, &path, &root, 0) != NULL) { |
879 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | 879 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, |
880 "directory index of \"%V\" is forbidden", &path); | 880 "directory index of \"%s\" is forbidden", path.data); |
881 } | 881 } |
882 | 882 |
883 ngx_http_finalize_request(r, NGX_HTTP_FORBIDDEN); | 883 ngx_http_finalize_request(r, NGX_HTTP_FORBIDDEN); |
884 return NGX_OK; | 884 return NGX_OK; |
885 } | 885 } |
2270 sn = ngx_array_push(&conf->server_names); | 2270 sn = ngx_array_push(&conf->server_names); |
2271 if (sn == NULL) { | 2271 if (sn == NULL) { |
2272 return NGX_CONF_ERROR; | 2272 return NGX_CONF_ERROR; |
2273 } | 2273 } |
2274 | 2274 |
2275 #if (NGX_PCRE) | |
2276 sn->regex = NULL; | |
2277 #endif | |
2278 sn->core_srv_conf = conf; | |
2275 sn->name.len = conf->server_name.len; | 2279 sn->name.len = conf->server_name.len; |
2276 sn->name.data = conf->server_name.data; | 2280 sn->name.data = conf->server_name.data; |
2277 sn->core_srv_conf = conf; | |
2278 } | 2281 } |
2279 | 2282 |
2280 ngx_conf_merge_size_value(conf->connection_pool_size, | 2283 ngx_conf_merge_size_value(conf->connection_pool_size, |
2281 prev->connection_pool_size, 256); | 2284 prev->connection_pool_size, 256); |
2282 ngx_conf_merge_size_value(conf->request_pool_size, | 2285 ngx_conf_merge_size_value(conf->request_pool_size, |
2717 | 2720 |
2718 u_char ch; | 2721 u_char ch; |
2719 ngx_str_t *value, name; | 2722 ngx_str_t *value, name; |
2720 ngx_uint_t i; | 2723 ngx_uint_t i; |
2721 ngx_http_server_name_t *sn; | 2724 ngx_http_server_name_t *sn; |
2725 #if (NGX_PCRE) | |
2726 ngx_str_t err; | |
2727 u_char errstr[NGX_MAX_CONF_ERRSTR]; | |
2728 #endif | |
2722 | 2729 |
2723 value = cf->args->elts; | 2730 value = cf->args->elts; |
2724 | 2731 |
2725 ch = value[1].data[0]; | 2732 ch = value[1].data[0]; |
2726 | 2733 |
2727 if (cscf->server_name.data == NULL && value[1].len) { | 2734 if (cscf->server_name.data == NULL && value[1].len) { |
2728 if (ch == '*') { | 2735 if (ngx_strchr(value[1].data, '*')) { |
2729 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 2736 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
2730 "first server name \"%V\" must not be wildcard", | 2737 "first server name \"%V\" must not be wildcard", |
2731 &value[1]); | 2738 &value[1]); |
2739 return NGX_CONF_ERROR; | |
2740 } | |
2741 | |
2742 if (value[1].data[0] == '~') { | |
2743 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | |
2744 "first server name \"%V\" " | |
2745 "must not be regular expression", &value[1]); | |
2732 return NGX_CONF_ERROR; | 2746 return NGX_CONF_ERROR; |
2733 } | 2747 } |
2734 | 2748 |
2735 name = value[1]; | 2749 name = value[1]; |
2736 | 2750 |
2773 sn = ngx_array_push(&cscf->server_names); | 2787 sn = ngx_array_push(&cscf->server_names); |
2774 if (sn == NULL) { | 2788 if (sn == NULL) { |
2775 return NGX_CONF_ERROR; | 2789 return NGX_CONF_ERROR; |
2776 } | 2790 } |
2777 | 2791 |
2792 #if (NGX_PCRE) | |
2793 sn->regex = NULL; | |
2794 #endif | |
2795 sn->core_srv_conf = cscf; | |
2778 sn->name.len = value[i].len; | 2796 sn->name.len = value[i].len; |
2779 sn->name.data = value[i].data; | 2797 sn->name.data = value[i].data; |
2780 sn->core_srv_conf = cscf; | 2798 |
2799 if (value[i].data[0] != '~') { | |
2800 continue; | |
2801 } | |
2802 | |
2803 #if (NGX_PCRE) | |
2804 err.len = NGX_MAX_CONF_ERRSTR; | |
2805 err.data = errstr; | |
2806 | |
2807 value[i].len--; | |
2808 value[i].data++; | |
2809 | |
2810 sn->regex = ngx_regex_compile(&value[i], NGX_REGEX_CASELESS, cf->pool, | |
2811 &err); | |
2812 | |
2813 if (sn->regex == NULL) { | |
2814 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "%s", err.data); | |
2815 return NGX_CONF_ERROR; | |
2816 } | |
2817 | |
2818 sn->name.len = value[i].len; | |
2819 sn->name.data = value[i].data; | |
2820 | |
2821 #else | |
2822 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | |
2823 "the using of the regex \"%V\" " | |
2824 "requires PCRE library", &value[i]); | |
2825 | |
2826 return NGX_CONF_ERROR; | |
2827 #endif | |
2781 } | 2828 } |
2782 | 2829 |
2783 return NGX_CONF_OK; | 2830 return NGX_CONF_OK; |
2784 } | 2831 } |
2785 | 2832 |