Welcome! Log In Create A New Profile

Advanced

[nginx] Upstream: avoided directly terminating the connection.

Maxim Dounin
September 08, 2014 07:34PM
details: http://hg.nginx.org/nginx/rev/54e9b83d00f0
branches:
changeset: 5827:54e9b83d00f0
user: FengGu <flygoast@126.com>
date: Wed Aug 13 14:53:55 2014 +0800
description:
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.

diffstat:

src/http/ngx_http_upstream.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -519,6 +519,11 @@ ngx_http_upstream_init_request(ngx_http_
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;

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Upstream: avoided directly terminating the connection.

Maxim Dounin 704 September 08, 2014 07:34PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 119
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready