]> git.kaiwu.me - nginx.git/commitdiff
Allow resetting connections closed by "return 444" (ticket #905).
authorRuslan Ermilov <ru@nginx.com>
Thu, 12 Jul 2018 09:50:20 +0000 (12:50 +0300)
committerRuslan Ermilov <ru@nginx.com>
Thu, 12 Jul 2018 09:50:20 +0000 (12:50 +0300)
If reset_timedout_connection is on, TCP connections closed by
"return 444" will be reset instead of a normal close.

src/http/ngx_http_request.c

index 0432c91b27617e1a08db9979cec66437687ba700..f302e561ee6f05da865ad173b40fa5f4e82d2d00 100644 (file)
@@ -2353,6 +2353,7 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
         || rc == NGX_HTTP_NO_CONTENT)
     {
         if (rc == NGX_HTTP_CLOSE) {
+            c->timedout = 1;
             ngx_http_terminate_request(r, rc);
             return;
         }