commit 075b617cb6e7327b98c09ab296a73d80426f75a6
Author: Thomas Eckert <Thomas.Eckert@Sophos.com>
Date:   Wed May 29 15:23:29 2013 +0200

    docx-patch: do not HTML rewrite application ctypes

diff --git a/modules/filters/mod_xml2enc.c b/modules/filters/mod_xml2enc.c
index 13608ed..0ad35aa 100644
--- a/modules/filters/mod_xml2enc.c
+++ b/modules/filters/mod_xml2enc.c
@@ -336,6 +336,15 @@ static apr_status_t xml2enc_ffunc(ap_filter_t* f, apr_bucket_brigade* bb)
         return ap_pass_brigade(f->next, bb) ;
     }
 
+    /* 'docx-patch': do not touch application ctypes, even if they contain "xml" */
+    if (!strncmp(ctype, "application", 11)) {
+      ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r, "application ctype detected, removing filter");
+      ap_remove_output_filter(f);
+      return ap_pass_brigade(f->next, bb);
+    }
+
     if (ctx->bbsave == NULL) {
         ctx->bbsave = apr_brigade_create(f->r->pool,
                                          f->r->connection->bucket_alloc);
