Mercurial > hg > nginx-vendor-current
comparison src/http/ngx_http_core_module.c @ 366:babd3d9efb62 NGINX_0_6_27
nginx 0.6.27
*) Change: now by default the rtsig method is not built on
Linux 2.6.18+.
*) Change: now a request method is not changed while redirection to a
named location via an "error_page" directive.
*) Feature: the "resolver" and "resolver_timeout" directives in SMTP
proxy.
*) Feature: the "post_action" directive supports named locations.
*) Bugfix: a segmentation fault occurred in worker process, if a
request was redirected from proxy, FastCGI, or memcached location to
static named locations.
*) Bugfix: browsers did not repeat SSL handshake if there is no valid
client certificate in first handshake.
Thanks to Alexander V. Inyukhin.
*) Bugfix: if response code 495-497 was redirected via an "error_page"
directive without code change, then nginx tried to allocate too many
memory.
*) Bugfix: memory leak in long-lived non buffered connections.
*) Bugfix: memory leak in resolver.
*) Bugfix: a segmentation fault occurred in worker process, if a
request was redirected from proxy, FastCGI, or memcached location to
static named locations.
*) Bugfix: in the $proxy_host and $proxy_port variables caching.
Thanks to Sergey Bochenkov.
*) Bugfix: a "proxy_pass" directive with variables used incorrectly the
same port as in another "proxy_pass" directive with the same host
name and without variables.
Thanks to Sergey Bochenkov.
*) Bugfix: an alert "sendmsg() failed (9: Bad file descriptor)" on some
64-bit platforms while reconfiguration.
*) Bugfix: a segmentation fault occurred in worker process, if empty
stub block was used second time in SSI.
*) Bugfix: in copying URI part contained escaped symbols into arguments.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 12 Mar 2008 00:00:00 +0300 |
parents | a39aab45a53f |
children | 6639b93e81b2 |
comparison
equal
deleted
inserted
replaced
365:9b0140fa1132 | 366:babd3d9efb62 |
---|---|
1914 | 1914 |
1915 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 1915 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
1916 "named location: %V \"%V?%V\"", name, &r->uri, &r->args); | 1916 "named location: %V \"%V?%V\"", name, &r->uri, &r->args); |
1917 | 1917 |
1918 r->internal = 1; | 1918 r->internal = 1; |
1919 | 1919 r->content_handler = NULL; |
1920 r->loc_conf = clcfp[i]->loc_conf; | 1920 r->loc_conf = clcfp[i]->loc_conf; |
1921 | 1921 |
1922 ngx_http_update_location_config(r); | 1922 ngx_http_update_location_config(r); |
1923 | 1923 |
1924 cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module); | 1924 cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module); |
1925 | 1925 |
1926 r->phase_handler = cmcf->phase_engine.location_rewrite_index; | 1926 r->phase_handler = cmcf->phase_engine.location_rewrite_index; |
1927 | |
1927 ngx_http_core_run_phases(r); | 1928 ngx_http_core_run_phases(r); |
1928 | 1929 |
1929 return NGX_DONE; | 1930 return NGX_DONE; |
1930 } | 1931 } |
1931 | 1932 |
2905 prev->lingering_timeout, 5000); | 2906 prev->lingering_timeout, 5000); |
2906 ngx_conf_merge_msec_value(conf->resolver_timeout, | 2907 ngx_conf_merge_msec_value(conf->resolver_timeout, |
2907 prev->resolver_timeout, 30000); | 2908 prev->resolver_timeout, 30000); |
2908 | 2909 |
2909 if (conf->resolver == NULL) { | 2910 if (conf->resolver == NULL) { |
2910 conf->resolver = prev->resolver; | 2911 |
2911 | 2912 if (prev->resolver == NULL) { |
2912 if (conf->resolver == NULL) { | 2913 |
2913 conf->resolver = ngx_resolver_create(NULL, cf->cycle->new_log); | 2914 /* |
2914 if (conf->resolver == NULL) { | 2915 * create dummy resolver in http {} context |
2916 * to inherit it in all servers | |
2917 */ | |
2918 | |
2919 prev->resolver = ngx_resolver_create(cf, NULL); | |
2920 if (prev->resolver == NULL) { | |
2915 return NGX_CONF_ERROR; | 2921 return NGX_CONF_ERROR; |
2916 } | 2922 } |
2917 } | 2923 } |
2924 | |
2925 conf->resolver = prev->resolver; | |
2918 } | 2926 } |
2919 | 2927 |
2920 ngx_conf_merge_path_value(conf->client_body_temp_path, | 2928 ngx_conf_merge_path_value(conf->client_body_temp_path, |
2921 prev->client_body_temp_path, | 2929 prev->client_body_temp_path, |
2922 NGX_HTTP_CLIENT_TEMP_PATH, 0, 0, 0, | 2930 NGX_HTTP_CLIENT_TEMP_PATH, 0, 0, 0, |
3549 "value \"%V\" must be between 400 and 599", | 3557 "value \"%V\" must be between 400 and 599", |
3550 &value[i]); | 3558 &value[i]); |
3551 return NGX_CONF_ERROR; | 3559 return NGX_CONF_ERROR; |
3552 } | 3560 } |
3553 | 3561 |
3554 err->overwrite = (overwrite >= 0) ? overwrite : err->status; | 3562 if (overwrite >= 0) { |
3563 err->overwrite = overwrite; | |
3564 | |
3565 } else { | |
3566 switch (err->status) { | |
3567 case NGX_HTTP_TO_HTTPS: | |
3568 case NGX_HTTPS_CERT_ERROR: | |
3569 case NGX_HTTPS_NO_CERT: | |
3570 err->overwrite = NGX_HTTP_BAD_REQUEST; | |
3571 break; | |
3572 | |
3573 default: | |
3574 err->overwrite = err->status; | |
3575 break; | |
3576 } | |
3577 } | |
3555 | 3578 |
3556 err->uri = uri; | 3579 err->uri = uri; |
3557 err->uri_lengths = uri_lengths; | 3580 err->uri_lengths = uri_lengths; |
3558 err->uri_values = uri_values; | 3581 err->uri_values = uri_values; |
3559 } | 3582 } |
3714 ngx_http_core_loc_conf_t *clcf = conf; | 3737 ngx_http_core_loc_conf_t *clcf = conf; |
3715 | 3738 |
3716 ngx_url_t u; | 3739 ngx_url_t u; |
3717 ngx_str_t *value; | 3740 ngx_str_t *value; |
3718 | 3741 |
3742 if (clcf->resolver) { | |
3743 return "is duplicate"; | |
3744 } | |
3745 | |
3719 value = cf->args->elts; | 3746 value = cf->args->elts; |
3720 | 3747 |
3721 ngx_memzero(&u, sizeof(ngx_url_t)); | 3748 ngx_memzero(&u, sizeof(ngx_url_t)); |
3722 | 3749 |
3723 u.host = value[1]; | 3750 u.host = value[1]; |
3726 if (ngx_inet_resolve_host(cf->pool, &u) != NGX_OK) { | 3753 if (ngx_inet_resolve_host(cf->pool, &u) != NGX_OK) { |
3727 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "%V: %s", &u.host, u.err); | 3754 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "%V: %s", &u.host, u.err); |
3728 return NGX_CONF_ERROR; | 3755 return NGX_CONF_ERROR; |
3729 } | 3756 } |
3730 | 3757 |
3731 clcf->resolver = ngx_resolver_create(&u.addrs[0], cf->cycle->new_log); | 3758 clcf->resolver = ngx_resolver_create(cf, &u.addrs[0]); |
3732 if (clcf->resolver == NULL) { | 3759 if (clcf->resolver == NULL) { |
3733 return NGX_OK; | 3760 return NGX_OK; |
3734 } | 3761 } |
3735 | 3762 |
3736 return NGX_CONF_OK; | 3763 return NGX_CONF_OK; |