comparison src/http/modules/ngx_http_proxy_module.c @ 206:3866d57d9cfd NGINX_0_3_50

nginx 0.3.50 *) Change: the "proxy_redirect_errors" and "fastcgi_redirect_errors" directives was renamed to the "proxy_intercept_errors" and "fastcgi_intercept_errors" directives. *) Feature: the ngx_http_charset_module supports the recoding from the single byte encodings to the UTF-8 encoding and back. *) Feature: the "X-Accel-Charset" response header line is supported in proxy and FastCGI mode. *) Bugfix: the "\" escape symbol in the "\"" and "\'" pairs in the SSI command was removed only if the command also has the "$" symbol. *) Bugfix: the "<!--" string might be added on some conditions in the SSI after inclusion. *) Bugfix: if the "Content-Length: 0" header line was in response, then in nonbuffered proxying mode the client connection was not closed.
author Igor Sysoev <http://sysoev.ru>
date Wed, 28 Jun 2006 00:00:00 +0400
parents ca5f86d94316
children 56688ed172c8
comparison
equal deleted inserted replaced
205:e53bd15c244a 206:3866d57d9cfd
113 113
114 static ngx_conf_deprecated_t ngx_conf_deprecated_proxy_header_buffer_size = { 114 static ngx_conf_deprecated_t ngx_conf_deprecated_proxy_header_buffer_size = {
115 ngx_conf_deprecated, "proxy_header_buffer_size", "proxy_buffer_size" 115 ngx_conf_deprecated, "proxy_header_buffer_size", "proxy_buffer_size"
116 }; 116 };
117 117
118 static ngx_conf_deprecated_t ngx_conf_deprecated_proxy_redirect_errors = {
119 ngx_conf_deprecated, "proxy_redirect_errors", "proxy_intercept_errors"
120 };
121
118 122
119 static ngx_conf_bitmask_t ngx_http_proxy_next_upstream_masks[] = { 123 static ngx_conf_bitmask_t ngx_http_proxy_next_upstream_masks[] = {
120 { ngx_string("error"), NGX_HTTP_UPSTREAM_FT_ERROR }, 124 { ngx_string("error"), NGX_HTTP_UPSTREAM_FT_ERROR },
121 { ngx_string("timeout"), NGX_HTTP_UPSTREAM_FT_TIMEOUT }, 125 { ngx_string("timeout"), NGX_HTTP_UPSTREAM_FT_TIMEOUT },
122 { ngx_string("invalid_header"), NGX_HTTP_UPSTREAM_FT_INVALID_HEADER }, 126 { ngx_string("invalid_header"), NGX_HTTP_UPSTREAM_FT_INVALID_HEADER },
176 ngx_conf_set_size_slot, 180 ngx_conf_set_size_slot,
177 NGX_HTTP_LOC_CONF_OFFSET, 181 NGX_HTTP_LOC_CONF_OFFSET,
178 offsetof(ngx_http_proxy_loc_conf_t, upstream.send_lowat), 182 offsetof(ngx_http_proxy_loc_conf_t, upstream.send_lowat),
179 &ngx_http_proxy_lowat_post }, 183 &ngx_http_proxy_lowat_post },
180 184
185 { ngx_string("proxy_intercept_errors"),
186 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
187 ngx_conf_set_flag_slot,
188 NGX_HTTP_LOC_CONF_OFFSET,
189 offsetof(ngx_http_proxy_loc_conf_t, upstream.intercept_errors),
190 NULL },
191
181 { ngx_string("proxy_redirect_errors"), 192 { ngx_string("proxy_redirect_errors"),
182 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, 193 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
183 ngx_conf_set_flag_slot, 194 ngx_conf_set_flag_slot,
184 NGX_HTTP_LOC_CONF_OFFSET, 195 NGX_HTTP_LOC_CONF_OFFSET,
185 offsetof(ngx_http_proxy_loc_conf_t, upstream.redirect_errors), 196 offsetof(ngx_http_proxy_loc_conf_t, upstream.intercept_errors),
186 NULL }, 197 &ngx_conf_deprecated_proxy_redirect_errors },
187 198
188 { ngx_string("proxy_set_header"), 199 { ngx_string("proxy_set_header"),
189 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE2, 200 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE2,
190 ngx_conf_set_keyval_slot, 201 ngx_conf_set_keyval_slot,
191 NGX_HTTP_LOC_CONF_OFFSET, 202 NGX_HTTP_LOC_CONF_OFFSET,
1484 conf->upstream.fail_timeout = NGX_CONF_UNSET; 1495 conf->upstream.fail_timeout = NGX_CONF_UNSET;
1485 1496
1486 conf->upstream.pass_request_headers = NGX_CONF_UNSET; 1497 conf->upstream.pass_request_headers = NGX_CONF_UNSET;
1487 conf->upstream.pass_request_body = NGX_CONF_UNSET; 1498 conf->upstream.pass_request_body = NGX_CONF_UNSET;
1488 1499
1489 conf->upstream.redirect_errors = NGX_CONF_UNSET; 1500 conf->upstream.intercept_errors = NGX_CONF_UNSET;
1490 1501
1491 /* "proxy_cyclic_temp_file" is disabled */ 1502 /* "proxy_cyclic_temp_file" is disabled */
1492 conf->upstream.cyclic_temp_file = 0; 1503 conf->upstream.cyclic_temp_file = 0;
1493 1504
1494 conf->redirect = NGX_CONF_UNSET; 1505 conf->redirect = NGX_CONF_UNSET;
1668 ngx_conf_merge_value(conf->upstream.pass_request_headers, 1679 ngx_conf_merge_value(conf->upstream.pass_request_headers,
1669 prev->upstream.pass_request_headers, 1); 1680 prev->upstream.pass_request_headers, 1);
1670 ngx_conf_merge_value(conf->upstream.pass_request_body, 1681 ngx_conf_merge_value(conf->upstream.pass_request_body,
1671 prev->upstream.pass_request_body, 1); 1682 prev->upstream.pass_request_body, 1);
1672 1683
1673 ngx_conf_merge_value(conf->upstream.redirect_errors, 1684 ngx_conf_merge_value(conf->upstream.intercept_errors,
1674 prev->upstream.redirect_errors, 0); 1685 prev->upstream.intercept_errors, 0);
1675 1686
1676 ngx_conf_merge_value(conf->redirect, prev->redirect, 1); 1687 ngx_conf_merge_value(conf->redirect, prev->redirect, 1);
1677 1688
1678 if (conf->redirect) { 1689 if (conf->redirect) {
1679 1690