From 5efc9507c487c37dfe2a279a4a0335cad701cd5f Mon Sep 17 00:00:00 2001
From: Eric Covener <covener@apache.org>
Date: Tue, 10 Jan 2023 09:19:03 PM GMT+0800
Subject: [PATCH] mod_proxy_ajp:cleanup on error 

Conflict:NA
Reference:https://github.com/apache/httpd/commit/5efc9507c487c37dfe2a279a4a0335cad701cd5f

---
 modules/proxy/mod_proxy_ajp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c
index a77a86b..89da918 100644
--- a/modules/proxy/mod_proxy_ajp.c
+++ b/modules/proxy/mod_proxy_ajp.c
@@ -256,6 +256,8 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
             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 {
-- 
2.23.0

