Abort_request callback of ngx_http_upstream_s

As I understand, abort_request() callback of upstream
(ngx_http_upstream_s) is never called now. Please correct me, if I am
wrong. The place to insert this function call is in
ngx_http_upstream_check_broken_connection(), right?

Posted at Nginx Forum:

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: