comparison src/http/ngx_http_upstream.c @ 5294:d44c3b36c53f

Upstream: consistent error handling after u->input_filter_init(). 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.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 25 Jul 2013 14:56:00 +0400
parents 2c4eb6ecba26
children a489c31c9783
comparison
equal deleted inserted replaced
5293:2c4eb6ecba26 5294:d44c3b36c53f
1680 u->input_filter = ngx_http_upstream_non_buffered_filter; 1680 u->input_filter = ngx_http_upstream_non_buffered_filter;
1681 u->input_filter_ctx = r; 1681 u->input_filter_ctx = r;
1682 } 1682 }
1683 1683
1684 if (u->input_filter_init(u->input_filter_ctx) == NGX_ERROR) { 1684 if (u->input_filter_init(u->input_filter_ctx) == NGX_ERROR) {
1685 ngx_http_upstream_finalize_request(r, u, 1685 ngx_http_upstream_finalize_request(r, u, NGX_ERROR);
1686 NGX_HTTP_INTERNAL_SERVER_ERROR);
1687 return; 1686 return;
1688 } 1687 }
1689 1688
1690 n = u->buffer.last - u->buffer.pos; 1689 n = u->buffer.last - u->buffer.pos;
1691 1690