mirror of
https://github.com/nginx/nginx.git
synced 2026-06-26 20:01:45 +00: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
1 changed files with 5 additions and 0 deletions
|
|
@ -519,6 +519,11 @@ ngx_http_upstream_init_request(ngx_http_request_t *r)
|
|||
return;
|
||||
}
|
||||
|
||||
if (rc == NGX_ERROR) {
|
||||
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (rc != NGX_DECLINED) {
|
||||
ngx_http_finalize_request(r, rc);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue