diff src/http/ngx_http_core_module.c @ 162:6be073125f2e NGINX_0_3_28

nginx 0.3.28 *) Feature: the "restrict_host_names" directive was canceled. *) Feature: the --with-cpu-opt=ppc64 configuration parameter. *) Bugfix: on some condition the proxied connection with a client was terminated prematurely. Thanks to Vladimir Shutoff. *) Bugfix: the "X-Accel-Limit-Rate" header line was not taken into account if the request was redirected using the "X-Accel-Redirect" header line. *) Bugfix: the "post_action" directive ran only after a successful completion of a request. *) Bugfix: the proxied response body generated by the "post_action" directive was transferred to a client.
author Igor Sysoev <http://sysoev.ru>
date Thu, 16 Feb 2006 00:00:00 +0300
parents 73e8476f9142
children 3314be145cb9
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -67,14 +67,6 @@ static ngx_conf_deprecated_t  ngx_conf_d
 };
 
 
-static ngx_conf_enum_t  ngx_http_restrict_host_names[] = {
-    { ngx_string("off"), NGX_HTTP_RESTRICT_HOST_OFF },
-    { ngx_string("on"), NGX_HTTP_RESTRICT_HOST_ON },
-    { ngx_string("close"), NGX_HTTP_RESTRICT_HOST_CLOSE },
-    { ngx_null_string, 0 }
-};
-
-
 static ngx_command_t  ngx_http_core_commands[] = {
 
     { ngx_string("variables_hash_max_size"),
@@ -147,13 +139,6 @@ static ngx_command_t  ngx_http_core_comm
       offsetof(ngx_http_core_srv_conf_t, large_client_header_buffers),
       NULL },
 
-    { ngx_string("restrict_host_names"),
-      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
-      ngx_conf_set_enum_slot,
-      NGX_HTTP_SRV_CONF_OFFSET,
-      offsetof(ngx_http_core_srv_conf_t, restrict_host_names),
-      &ngx_http_restrict_host_names },
-
     { ngx_string("optimize_server_names"),
       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_FLAG,
       ngx_conf_set_flag_slot,
@@ -747,7 +732,9 @@ ngx_http_update_location_config(ngx_http
         r->connection->tcp_nopush = NGX_TCP_NOPUSH_DISABLED;
     }
 
-    r->limit_rate = clcf->limit_rate;
+    if (r->limit_rate == 0) {
+        r->limit_rate = clcf->limit_rate;
+    }
 
     if (clcf->handler) {
         r->content_handler = clcf->handler;
@@ -1879,7 +1866,6 @@ ngx_http_core_create_srv_conf(ngx_conf_t
     cscf->request_pool_size = NGX_CONF_UNSET_SIZE;
     cscf->client_header_timeout = NGX_CONF_UNSET_MSEC;
     cscf->client_header_buffer_size = NGX_CONF_UNSET_SIZE;
-    cscf->restrict_host_names = NGX_CONF_UNSET_UINT;
     cscf->optimize_server_names = NGX_CONF_UNSET;
     cscf->ignore_invalid_headers = NGX_CONF_UNSET;
 
@@ -1965,9 +1951,6 @@ ngx_http_core_merge_srv_conf(ngx_conf_t 
         return NGX_CONF_ERROR;
     }
 
-    ngx_conf_merge_unsigned_value(conf->restrict_host_names,
-                              prev->restrict_host_names, 0);
-
     ngx_conf_merge_value(conf->optimize_server_names,
                               prev->optimize_server_names, 1);