]> git.kaiwu.me - nginx.git/commitdiff
Upstream: consistent error handling after u->input_filter_init().
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 25 Jul 2013 10:56:00 +0000 (14:56 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 25 Jul 2013 10:56:00 +0000 (14:56 +0400)
In all cases ngx_http_upstream_finalize_request() with NGX_ERROR now used.
Previously used NGX_HTTP_INTERNAL_SERVER_ERROR in the subrequest in memory
case don't cause any harm, but inconsistent with other uses.

src/http/ngx_http_upstream.c

index a6397c99e310b2d2f84c46cb657cad9d24ca7c8a..50c41e3abb49a725547269d5394d6f2e698a4a1a 100644 (file)
@@ -1682,8 +1682,7 @@ ngx_http_upstream_process_header(ngx_http_request_t *r, ngx_http_upstream_t *u)
     }
 
     if (u->input_filter_init(u->input_filter_ctx) == NGX_ERROR) {
-        ngx_http_upstream_finalize_request(r, u,
-                                           NGX_HTTP_INTERNAL_SERVER_ERROR);
+        ngx_http_upstream_finalize_request(r, u, NGX_ERROR);
         return;
     }