8d2dcd
diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c
8d2dcd
index 6faabea..058b03f 100644
8d2dcd
--- a/modules/proxy/mod_proxy_ajp.c
8d2dcd
+++ b/modules/proxy/mod_proxy_ajp.c
8d2dcd
@@ -249,9 +249,18 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
8d2dcd
     /* read the first bloc of data */
8d2dcd
     input_brigade = apr_brigade_create(p, r->connection->bucket_alloc);
8d2dcd
     tenc = apr_table_get(r->headers_in, "Transfer-Encoding");
8d2dcd
-    if (tenc && (strcasecmp(tenc, "chunked") == 0)) {
8d2dcd
-        /* The AJP protocol does not want body data yet */
8d2dcd
-        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00870) "request is chunked");
8d2dcd
+    if (tenc) {
8d2dcd
+        if (ap_cstr_casecmp(tenc, "chunked") == 0) {
8d2dcd
+            /* The AJP protocol does not want body data yet */
8d2dcd
+            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00870)
8d2dcd
+                          "request is chunked");
8d2dcd
+        }
8d2dcd
+        else {
8d2dcd
+            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10396)
8d2dcd
+                          "%s Transfer-Encoding is not supported",
8d2dcd
+                          tenc);
8d2dcd
+            return HTTP_INTERNAL_SERVER_ERROR;
8d2dcd
+        }
8d2dcd
     } else {
8d2dcd
         /* Get client provided Content-Length header */
8d2dcd
         content_length = get_content_length(r);