comparison 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
comparison
equal deleted inserted replaced
161:086553d7da41 162:6be073125f2e
65 static ngx_conf_deprecated_t ngx_conf_deprecated_optimize_host_names = { 65 static ngx_conf_deprecated_t ngx_conf_deprecated_optimize_host_names = {
66 ngx_conf_deprecated, "optimize_host_names", "optimize_server_names" 66 ngx_conf_deprecated, "optimize_host_names", "optimize_server_names"
67 }; 67 };
68 68
69 69
70 static ngx_conf_enum_t ngx_http_restrict_host_names[] = {
71 { ngx_string("off"), NGX_HTTP_RESTRICT_HOST_OFF },
72 { ngx_string("on"), NGX_HTTP_RESTRICT_HOST_ON },
73 { ngx_string("close"), NGX_HTTP_RESTRICT_HOST_CLOSE },
74 { ngx_null_string, 0 }
75 };
76
77
78 static ngx_command_t ngx_http_core_commands[] = { 70 static ngx_command_t ngx_http_core_commands[] = {
79 71
80 { ngx_string("variables_hash_max_size"), 72 { ngx_string("variables_hash_max_size"),
81 NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1, 73 NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
82 ngx_conf_set_num_slot, 74 ngx_conf_set_num_slot,
144 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE2, 136 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE2,
145 ngx_conf_set_bufs_slot, 137 ngx_conf_set_bufs_slot,
146 NGX_HTTP_SRV_CONF_OFFSET, 138 NGX_HTTP_SRV_CONF_OFFSET,
147 offsetof(ngx_http_core_srv_conf_t, large_client_header_buffers), 139 offsetof(ngx_http_core_srv_conf_t, large_client_header_buffers),
148 NULL }, 140 NULL },
149
150 { ngx_string("restrict_host_names"),
151 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
152 ngx_conf_set_enum_slot,
153 NGX_HTTP_SRV_CONF_OFFSET,
154 offsetof(ngx_http_core_srv_conf_t, restrict_host_names),
155 &ngx_http_restrict_host_names },
156 141
157 { ngx_string("optimize_server_names"), 142 { ngx_string("optimize_server_names"),
158 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_FLAG, 143 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_FLAG,
159 ngx_conf_set_flag_slot, 144 ngx_conf_set_flag_slot,
160 NGX_HTTP_SRV_CONF_OFFSET, 145 NGX_HTTP_SRV_CONF_OFFSET,
745 if (!clcf->tcp_nopush) { 730 if (!clcf->tcp_nopush) {
746 /* disable TCP_NOPUSH/TCP_CORK use */ 731 /* disable TCP_NOPUSH/TCP_CORK use */
747 r->connection->tcp_nopush = NGX_TCP_NOPUSH_DISABLED; 732 r->connection->tcp_nopush = NGX_TCP_NOPUSH_DISABLED;
748 } 733 }
749 734
750 r->limit_rate = clcf->limit_rate; 735 if (r->limit_rate == 0) {
736 r->limit_rate = clcf->limit_rate;
737 }
751 738
752 if (clcf->handler) { 739 if (clcf->handler) {
753 r->content_handler = clcf->handler; 740 r->content_handler = clcf->handler;
754 } 741 }
755 } 742 }
1877 1864
1878 cscf->connection_pool_size = NGX_CONF_UNSET_SIZE; 1865 cscf->connection_pool_size = NGX_CONF_UNSET_SIZE;
1879 cscf->request_pool_size = NGX_CONF_UNSET_SIZE; 1866 cscf->request_pool_size = NGX_CONF_UNSET_SIZE;
1880 cscf->client_header_timeout = NGX_CONF_UNSET_MSEC; 1867 cscf->client_header_timeout = NGX_CONF_UNSET_MSEC;
1881 cscf->client_header_buffer_size = NGX_CONF_UNSET_SIZE; 1868 cscf->client_header_buffer_size = NGX_CONF_UNSET_SIZE;
1882 cscf->restrict_host_names = NGX_CONF_UNSET_UINT;
1883 cscf->optimize_server_names = NGX_CONF_UNSET; 1869 cscf->optimize_server_names = NGX_CONF_UNSET;
1884 cscf->ignore_invalid_headers = NGX_CONF_UNSET; 1870 cscf->ignore_invalid_headers = NGX_CONF_UNSET;
1885 1871
1886 return cscf; 1872 return cscf;
1887 } 1873 }
1962 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 1948 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
1963 "the \"large_client_header_buffers\" size must be " 1949 "the \"large_client_header_buffers\" size must be "
1964 "equal to or bigger than \"connection_pool_size\""); 1950 "equal to or bigger than \"connection_pool_size\"");
1965 return NGX_CONF_ERROR; 1951 return NGX_CONF_ERROR;
1966 } 1952 }
1967
1968 ngx_conf_merge_unsigned_value(conf->restrict_host_names,
1969 prev->restrict_host_names, 0);
1970 1953
1971 ngx_conf_merge_value(conf->optimize_server_names, 1954 ngx_conf_merge_value(conf->optimize_server_names,
1972 prev->optimize_server_names, 1); 1955 prev->optimize_server_names, 1);
1973 1956
1974 ngx_conf_merge_value(conf->ignore_invalid_headers, 1957 ngx_conf_merge_value(conf->ignore_invalid_headers,