]> git.kaiwu.me - nginx.git/commitdiff
not do ngx_http_upstream_finalize_request() twice
authorIgor Sysoev <igor@sysoev.ru>
Tue, 10 Oct 2006 13:17:58 +0000 (13:17 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 10 Oct 2006 13:17:58 +0000 (13:17 +0000)
src/http/ngx_http_upstream.c

index ad3f0fbf5cd03f77e19dfb169c778406ea9d421e..e4a4d40583c25c62234390e4300b40dc2e5548a5 100644 (file)
@@ -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;
         }