summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-10-10 13:17:58 +0000
committerIgor Sysoev <igor@sysoev.ru>2006-10-10 13:17:58 +0000
commitcea316dbae9410838838861f3018c2e93078fb01 (patch)
tree1ef1fbf388887a10223547bf11d045da5b57efa8 /src
parente3fbaeaffe256b408b146c8d77e1c5c744d63c14 (diff)
downloadnginx-cea316dbae9410838838861f3018c2e93078fb01.tar.gz
nginx-cea316dbae9410838838861f3018c2e93078fb01.tar.bz2
not do ngx_http_upstream_finalize_request() twice
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_upstream.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index ad3f0fbf5..e4a4d4058 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -1137,6 +1137,7 @@ 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);
part = &r->upstream->headers_in.headers.part;
@@ -1159,8 +1160,8 @@ ngx_http_upstream_process_header(ngx_event_t *rev)
if (hh && hh->redirect) {
if (hh->copy_handler(r, &h[i], hh->conf) != NGX_OK) {
- ngx_http_upstream_finalize_request(r, u,
- NGX_HTTP_INTERNAL_SERVER_ERROR);
+ ngx_http_finalize_request(r,
+ NGX_HTTP_INTERNAL_SERVER_ERROR);
return;
}
}
@@ -1172,7 +1173,7 @@ ngx_http_upstream_process_header(ngx_event_t *rev)
flags = 0;
if (ngx_http_parse_unsafe_uri(r, uri, &args, &flags) != NGX_OK) {
- ngx_http_upstream_finalize_request(r, u, NGX_HTTP_NOT_FOUND);
+ ngx_http_finalize_request(r, NGX_HTTP_NOT_FOUND);
return;
}