From d93e61e3e9622bacff746772cb9c97fdcaed8baf Mon Sep 17 00:00:00 2001
From: Eric Covener <covener@apache.org>
Date: Tue, 10 Jan 2023 13:20:55 +0000
Subject: [PATCH] Merge r1906540 from trunk:

cleanup on error


Reviewed By: rpluem, gbechis, covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1906542 13f79535-47bb-0310-9956-ffa450edef68
---
 modules/proxy/mod_proxy_ajp.c | 2 ++
 1 file changed, 2 insertions(+)

--- a/modules/proxy/mod_proxy_ajp.c
+++ b/modules/proxy/mod_proxy_ajp.c
@@ -255,6 +255,8 @@ static int ap_proxy_ajp_request(apr_pool
             ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10396)
                           "%s Transfer-Encoding is not supported",
                           tenc);
+            /* We had a failure: Close connection to backend */
+            conn->close = 1;
             return HTTP_INTERNAL_SERVER_ERROR;
         }
     } else {
