diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2006-08-30 10:39:17 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2006-08-30 10:39:17 +0000 |
| commit | da173abde0afa26b02c778d6475462ed487594c5 (patch) | |
| tree | 25362ec56c889a2284e6feb341d5b87f13b5beab /src/http/ngx_http_upstream.c | |
| parent | 9cdd8a1cbcf70527db51eeab707a5bc05babdcf3 (diff) | |
| download | nginx-release-0.4.0.tar.gz nginx-release-0.4.0.tar.bz2 | |
nginx-0.4.0-RELEASE importrelease-0.4.0
*) 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.
Diffstat (limited to '')
| -rw-r--r-- | src/http/ngx_http_upstream.c | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index cede08d27..2cdfdc8ba 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -1134,11 +1134,11 @@ ngx_http_upstream_process_header(ngx_event_t *rev) } } + 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 @@ ngx_http_upstream_process_header(ngx_event_t *rev) 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 @@ ngx_http_upstream_send_response(ngx_http_request_t *r, ngx_http_upstream_t *u) 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) { |
