Welcome! Log In Create A New Profile

Advanced

[PATCH]Upstream: avoided directly terminating the connection.

August 13, 2014 03:06AM
# HG changeset patch
# User FengGu <flygoast@126.com>
# Date 1407912835 -28800
# Wed Aug 13 14:53:55 2014 +0800
# Node ID 9dd4e38fcce05bcbba4747873a579bc2c9392dd2
# Parent 92490a725fef588939abfe0e1fe89cda0788d02d
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.


diff -r 92490a725fef -r 9dd4e38fcce0 src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c Sun Aug 10 17:44:46 2014 +0400
+++ b/src/http/ngx_http_upstream.c Wed Aug 13 14:53:55 2014 +0800
@@ -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

[PATCH]Upstream: avoided directly terminating the connection.

flygoast 728 August 13, 2014 03:06AM

Re: [PATCH]Upstream: avoided directly terminating the connection.

Maxim Dounin 318 September 08, 2014 07:36PM



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

Online Users

Guests: 161
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