Mercurial > hg > nginx
diff src/http/ngx_http_upstream.c @ 681:7e24168b0853 release-0.4.0
nginx-0.4.0-RELEASE import
*) Change in internal API: the HTTP modules initialization was moved
from the init module phase to the HTTP postconfiguration phase.
*) Change: now the request body is not read beforehand for the
ngx_http_perl_module: it's required to start the reading using the
$r->has_request_body method.
*) Feature: the ngx_http_perl_module supports the DECLINED return code.
*) Feature: the ngx_http_dav_module supports the incoming "Date" header
line for the PUT method.
*) Feature: the "ssi" directive is available inside the "if" block.
*) Bugfix: a segmentation fault occurred if there was an "index"
directive with variables and the first index name was without
variables; the bug had appeared in 0.1.29.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 30 Aug 2006 10:39:17 +0000 |
parents | e924670896ab |
children | e3df50b4a4fd |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c Mon Aug 28 16:57:48 2006 +0000 +++ b/src/http/ngx_http_upstream.c Wed Aug 30 10:39:17 2006 +0000 @@ -1134,11 +1134,11 @@ } } + umcf = ngx_http_get_module_main_conf(r, ngx_http_upstream_module); + if (r->upstream->headers_in.x_accel_redirect) { ngx_http_upstream_finalize_request(r, u, NGX_DECLINED); - umcf = ngx_http_get_module_main_conf(r, ngx_http_upstream_module); - part = &r->upstream->headers_in.headers.part; h = part->elts; @@ -1188,29 +1188,6 @@ return; } - ngx_http_upstream_send_response(r, u); -} - - -static void -ngx_http_upstream_send_response(ngx_http_request_t *r, ngx_http_upstream_t *u) -{ - int tcp_nodelay; - ssize_t size; - ngx_int_t rc; - ngx_uint_t i; - ngx_list_part_t *part; - ngx_table_elt_t *h; - ngx_event_pipe_t *p; - ngx_connection_t *c; - ngx_pool_cleanup_t *cl; - ngx_pool_cleanup_file_t *clf; - ngx_http_core_loc_conf_t *clcf; - ngx_http_upstream_header_t *hh; - ngx_http_upstream_main_conf_t *umcf; - - umcf = ngx_http_get_module_main_conf(r, ngx_http_upstream_module); - part = &r->upstream->headers_in.headers.part; h = part->elts; @@ -1270,6 +1247,22 @@ u->length = NGX_MAX_SIZE_T_VALUE; } + ngx_http_upstream_send_response(r, u); +} + + +static void +ngx_http_upstream_send_response(ngx_http_request_t *r, ngx_http_upstream_t *u) +{ + int tcp_nodelay; + ssize_t size; + ngx_int_t rc; + ngx_event_pipe_t *p; + ngx_connection_t *c; + ngx_pool_cleanup_t *cl; + ngx_pool_cleanup_file_t *clf; + ngx_http_core_loc_conf_t *clcf; + rc = ngx_http_send_header(r); if (rc == NGX_ERROR || rc > NGX_OK || r->post_action) {