mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Upstream: avoided directly terminating the connection.
When memory allocation failed in ngx_http_upstream_cache(), the connection would be terminated directly in ngx_http_upstream_init_request(). Return a INTERNAL_SERVER_ERROR response instead.
This commit is contained in:
parent
cb8a0327ab
commit
b4cb8475b1
@ -519,6 +519,11 @@ ngx_http_upstream_init_request(ngx_http_request_t *r)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rc == NGX_ERROR) {
|
||||||
|
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (rc != NGX_DECLINED) {
|
if (rc != NGX_DECLINED) {
|
||||||
ngx_http_finalize_request(r, rc);
|
ngx_http_finalize_request(r, rc);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user