Mercurial > hg > nginx-vendor-1-0
comparison src/http/modules/ngx_http_proxy_module.c @ 178:87699398f955 NGINX_0_3_36
nginx 0.3.36
*) Feature: the ngx_http_addition_filter_module.
*) Feature: the "proxy_pass" and "fastcgi_pass" directives may be used
inside the "if" block.
*) Feature: the "proxy_ignore_client_abort" and
"fastcgi_ignore_client_abort" directives.
*) Feature: the "$request_completion" variable.
*) Feature: the ngx_http_perl_module supports the $r->request_method
and $r->remote_addr.
*) Feature: the ngx_http_ssi_module supports the "elif" command.
*) Bugfix: the "\/" string in the expression of the "if" command of the
ngx_http_ssi_module was treated incorrectly.
*) Bugfix: in the regular expressions in the "if" command of the
ngx_http_ssi_module.
*) Bugfix: if the relative path was specified in the
"client_body_temp_path", "proxy_temp_path", "fastcgi_temp_path", and
"perl_modules" directives, then the directory was used relatively to
a current path but not to a server prefix.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 05 Apr 2006 00:00:00 +0400 |
parents | fae16d0c5bf4 |
children | 54aabf2b0bc6 |
comparison
equal
deleted
inserted
replaced
177:4a3ddd758222 | 178:87699398f955 |
---|---|
128 | 128 |
129 | 129 |
130 static ngx_command_t ngx_http_proxy_commands[] = { | 130 static ngx_command_t ngx_http_proxy_commands[] = { |
131 | 131 |
132 { ngx_string("proxy_pass"), | 132 { ngx_string("proxy_pass"), |
133 NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, | 133 NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_TAKE1, |
134 ngx_http_proxy_pass, | 134 ngx_http_proxy_pass, |
135 NGX_HTTP_LOC_CONF_OFFSET, | 135 NGX_HTTP_LOC_CONF_OFFSET, |
136 0, | 136 0, |
137 NULL }, | 137 NULL }, |
138 | 138 |
146 { ngx_string("proxy_buffering"), | 146 { ngx_string("proxy_buffering"), |
147 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | 147 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, |
148 ngx_conf_set_flag_slot, | 148 ngx_conf_set_flag_slot, |
149 NGX_HTTP_LOC_CONF_OFFSET, | 149 NGX_HTTP_LOC_CONF_OFFSET, |
150 offsetof(ngx_http_proxy_loc_conf_t, upstream.buffering), | 150 offsetof(ngx_http_proxy_loc_conf_t, upstream.buffering), |
151 NULL }, | |
152 | |
153 { ngx_string("proxy_ignore_client_abort"), | |
154 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | |
155 ngx_conf_set_flag_slot, | |
156 NGX_HTTP_LOC_CONF_OFFSET, | |
157 offsetof(ngx_http_proxy_loc_conf_t, upstream.ignore_client_abort), | |
151 NULL }, | 158 NULL }, |
152 | 159 |
153 { ngx_string("proxy_connect_timeout"), | 160 { ngx_string("proxy_connect_timeout"), |
154 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, | 161 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, |
155 ngx_conf_set_msec_slot, | 162 ngx_conf_set_msec_slot, |
1413 * conf->body_source = { 0, NULL }; | 1420 * conf->body_source = { 0, NULL }; |
1414 * conf->rewrite_locations = NULL; | 1421 * conf->rewrite_locations = NULL; |
1415 */ | 1422 */ |
1416 | 1423 |
1417 conf->upstream.buffering = NGX_CONF_UNSET; | 1424 conf->upstream.buffering = NGX_CONF_UNSET; |
1425 conf->upstream.ignore_client_abort = NGX_CONF_UNSET; | |
1418 | 1426 |
1419 conf->upstream.connect_timeout = NGX_CONF_UNSET_MSEC; | 1427 conf->upstream.connect_timeout = NGX_CONF_UNSET_MSEC; |
1420 conf->upstream.send_timeout = NGX_CONF_UNSET_MSEC; | 1428 conf->upstream.send_timeout = NGX_CONF_UNSET_MSEC; |
1421 conf->upstream.read_timeout = NGX_CONF_UNSET_MSEC; | 1429 conf->upstream.read_timeout = NGX_CONF_UNSET_MSEC; |
1422 | 1430 |
1466 ngx_http_script_copy_code_t *copy; | 1474 ngx_http_script_copy_code_t *copy; |
1467 | 1475 |
1468 ngx_conf_merge_value(conf->upstream.buffering, | 1476 ngx_conf_merge_value(conf->upstream.buffering, |
1469 prev->upstream.buffering, 1); | 1477 prev->upstream.buffering, 1); |
1470 | 1478 |
1479 ngx_conf_merge_value(conf->upstream.ignore_client_abort, | |
1480 prev->upstream.ignore_client_abort, 0); | |
1481 | |
1471 ngx_conf_merge_msec_value(conf->upstream.connect_timeout, | 1482 ngx_conf_merge_msec_value(conf->upstream.connect_timeout, |
1472 prev->upstream.connect_timeout, 60000); | 1483 prev->upstream.connect_timeout, 60000); |
1473 | 1484 |
1474 ngx_conf_merge_msec_value(conf->upstream.send_timeout, | 1485 ngx_conf_merge_msec_value(conf->upstream.send_timeout, |
1475 prev->upstream.send_timeout, 60000); | 1486 prev->upstream.send_timeout, 60000); |
1652 } | 1663 } |
1653 | 1664 |
1654 | 1665 |
1655 if (conf->peers == NULL) { | 1666 if (conf->peers == NULL) { |
1656 conf->peers = prev->peers; | 1667 conf->peers = prev->peers; |
1668 | |
1669 conf->host_header = prev->host_header; | |
1670 conf->port_text = prev->port_text; | |
1671 conf->upstream.schema = prev->upstream.schema; | |
1657 } | 1672 } |
1658 | 1673 |
1659 | 1674 |
1660 if (conf->body_source.data == NULL) { | 1675 if (conf->body_source.data == NULL) { |
1661 conf->body_source = prev->body_source; | 1676 conf->body_source = prev->body_source; |
2055 | 2070 |
2056 plcf->upstream.location = clcf->name; | 2071 plcf->upstream.location = clcf->name; |
2057 | 2072 |
2058 #if (NGX_PCRE) | 2073 #if (NGX_PCRE) |
2059 | 2074 |
2060 if (clcf->regex) { | 2075 if (clcf->regex || clcf->noname) { |
2061 if (plcf->upstream.uri.len) { | 2076 if (plcf->upstream.uri.len) { |
2062 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 2077 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
2063 "\"proxy_pass\" may not have URI part in " | 2078 "\"proxy_pass\" may not have URI part in " |
2064 "location given by regular expression"); | 2079 "location given by regular expression or " |
2080 "inside the \"if\" statement"); | |
2065 return NGX_CONF_ERROR; | 2081 return NGX_CONF_ERROR; |
2066 } | 2082 } |
2067 | 2083 |
2068 plcf->upstream.location.len = 0; | 2084 plcf->upstream.location.len = 0; |
2069 } | 2085 } |