Mercurial > hg > nginx-vendor-current
comparison src/http/ngx_http_core_module.c @ 592:09d5f308901f NGINX_0_8_48
nginx 0.8.48
*) Change: now the "server_name" directive default value is an empty
name "".
Thanks to Gena Makhomed.
*) Change: now the "server_name_in_redirect" directive default value is
"off".
*) Feature: the $geoip_dma_code, $geoip_area_code, and
$geoip_region_name variables.
Thanks to Christine McGonagle.
*) Bugfix: the "proxy_pass", "fastcgi_pass", "uwsgi_pass", and
"scgi_pass" directives were not inherited inside "limit_except"
blocks.
*) Bugfix: the "proxy_cache_min_uses", "fastcgi_cache_min_uses"
"uwsgi_cache_min_uses", and "scgi_cache_min_uses" directives did not
work; the bug had appeared in 0.8.46.
*) Bugfix: the "fastcgi_split_path_info" directive used incorrectly
captures, if only parts of an URI were captured.
Thanks to Yuriy Taraday and Frank Enderle.
*) Bugfix: the "rewrite" directive did not escape a ";" character
during copying from URI to query string.
Thanks to Daisuke Murase.
*) Bugfix: the ngx_http_image_filter_module closed a connection, if an
image was larger than "image_filter_buffer" size.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 03 Aug 2010 00:00:00 +0400 |
parents | cde3626b2d0d |
children | 6c96fdd2dfc3 |
comparison
equal
deleted
inserted
replaced
591:8b891ad58d6a | 592:09d5f308901f |
---|---|
3009 return NGX_CONF_OK; | 3009 return NGX_CONF_OK; |
3010 } | 3010 } |
3011 } | 3011 } |
3012 | 3012 |
3013 if (conf->server_name.data == NULL) { | 3013 if (conf->server_name.data == NULL) { |
3014 conf->server_name = cf->cycle->hostname; | 3014 ngx_str_set(&conf->server_name, ""); |
3015 | 3015 |
3016 sn = ngx_array_push(&conf->server_names); | 3016 sn = ngx_array_push(&conf->server_names); |
3017 if (sn == NULL) { | 3017 if (sn == NULL) { |
3018 return NGX_CONF_ERROR; | 3018 return NGX_CONF_ERROR; |
3019 } | 3019 } |
3020 | 3020 |
3021 #if (NGX_PCRE) | 3021 #if (NGX_PCRE) |
3022 sn->regex = NULL; | 3022 sn->regex = NULL; |
3023 #endif | 3023 #endif |
3024 sn->server = conf; | 3024 sn->server = conf; |
3025 sn->name.len = conf->server_name.len; | 3025 ngx_str_set(&sn->name, ""); |
3026 sn->name.data = conf->server_name.data; | |
3027 } | 3026 } |
3028 | 3027 |
3029 return NGX_CONF_OK; | 3028 return NGX_CONF_OK; |
3030 } | 3029 } |
3031 | 3030 |
3329 } | 3328 } |
3330 | 3329 |
3331 ngx_conf_merge_value(conf->reset_timedout_connection, | 3330 ngx_conf_merge_value(conf->reset_timedout_connection, |
3332 prev->reset_timedout_connection, 0); | 3331 prev->reset_timedout_connection, 0); |
3333 ngx_conf_merge_value(conf->server_name_in_redirect, | 3332 ngx_conf_merge_value(conf->server_name_in_redirect, |
3334 prev->server_name_in_redirect, 1); | 3333 prev->server_name_in_redirect, 0); |
3335 ngx_conf_merge_value(conf->port_in_redirect, prev->port_in_redirect, 1); | 3334 ngx_conf_merge_value(conf->port_in_redirect, prev->port_in_redirect, 1); |
3336 ngx_conf_merge_value(conf->msie_padding, prev->msie_padding, 1); | 3335 ngx_conf_merge_value(conf->msie_padding, prev->msie_padding, 1); |
3337 ngx_conf_merge_value(conf->msie_refresh, prev->msie_refresh, 0); | 3336 ngx_conf_merge_value(conf->msie_refresh, prev->msie_refresh, 0); |
3338 ngx_conf_merge_value(conf->log_not_found, prev->log_not_found, 1); | 3337 ngx_conf_merge_value(conf->log_not_found, prev->log_not_found, 1); |
3339 ngx_conf_merge_value(conf->log_subrequest, prev->log_subrequest, 0); | 3338 ngx_conf_merge_value(conf->log_subrequest, prev->log_subrequest, 0); |
3607 value = cf->args->elts; | 3606 value = cf->args->elts; |
3608 | 3607 |
3609 ch = value[1].data[0]; | 3608 ch = value[1].data[0]; |
3610 | 3609 |
3611 if (cscf->server_name.data == NULL) { | 3610 if (cscf->server_name.data == NULL) { |
3612 if (value[1].len) { | 3611 name = value[1]; |
3613 name = value[1]; | 3612 |
3614 | 3613 if (ch == '.') { |
3615 if (ch == '.') { | 3614 name.len--; |
3616 name.len--; | 3615 name.data++; |
3617 name.data++; | 3616 } |
3618 } | 3617 |
3619 | 3618 cscf->server_name.len = name.len; |
3620 cscf->server_name.len = name.len; | 3619 cscf->server_name.data = ngx_pstrdup(cf->pool, &name); |
3621 cscf->server_name.data = ngx_pstrdup(cf->pool, &name); | 3620 if (cscf->server_name.data == NULL) { |
3622 if (cscf->server_name.data == NULL) { | |
3623 return NGX_CONF_ERROR; | |
3624 } | |
3625 | |
3626 } else { | |
3627 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | |
3628 "the first server name must not be empty"); | |
3629 return NGX_CONF_ERROR; | 3621 return NGX_CONF_ERROR; |
3630 } | 3622 } |
3631 } | 3623 } |
3632 | 3624 |
3633 for (i = 1; i < cf->args->nelts; i++) { | 3625 for (i = 1; i < cf->args->nelts; i++) { |
3914 clcf = ctx->loc_conf[ngx_http_core_module.ctx_index]; | 3906 clcf = ctx->loc_conf[ngx_http_core_module.ctx_index]; |
3915 pclcf->limit_except_loc_conf = ctx->loc_conf; | 3907 pclcf->limit_except_loc_conf = ctx->loc_conf; |
3916 clcf->loc_conf = ctx->loc_conf; | 3908 clcf->loc_conf = ctx->loc_conf; |
3917 clcf->name = pclcf->name; | 3909 clcf->name = pclcf->name; |
3918 clcf->noname = 1; | 3910 clcf->noname = 1; |
3911 clcf->lmt_excpt = 1; | |
3919 | 3912 |
3920 if (ngx_http_add_location(cf, &pclcf->locations, clcf) != NGX_OK) { | 3913 if (ngx_http_add_location(cf, &pclcf->locations, clcf) != NGX_OK) { |
3921 return NGX_CONF_ERROR; | 3914 return NGX_CONF_ERROR; |
3922 } | 3915 } |
3923 | 3916 |