abort_request callback of ngx_http_upstream_s

artemg nginx-forum at nginx.us
Wed Nov 16 00:35:59 UTC 2011


I have made this patch, but not sure if it is correct.

diff -u nginx-1.0.6/src/http/ngx_http_upstream.c
nginx-1.0.6_/src/http/ngx_http_upstream.c
--- nginx-1.0.6/src/http/ngx_http_upstream.c    2011-08-29
05:56:09.000000000 -0700
+++ nginx-1.0.6_/src/http/ngx_http_upstream.c   2011-11-11
02:17:36.000000000 -0800
@@ -1048,6 +1048,8 @@
     ev->eof = 1;
     c->error = 1;

+    u->abort_request(r);
+
     if (!u->cacheable && u->peer.connection) {
         ngx_log_error(NGX_LOG_INFO, ev->log, err,
                       "client closed prematurely connection, "

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,218412,218415#msg-218415



More information about the nginx mailing list