https://bz.apache.org/bugzilla/show_bug.cgi?id=64339

--- Comment #2 from Joseph Heenan <jos...@heenan.me.uk> ---
I've just run into this same problem.

The issue is that the file is being utf8 encoded - notice how the character
0xb1 is being turned into 0xc2 0xb1, which is it's utf8 encoding (
https://www.compart.com/en/unicode/U+00B1 ).

The problem is not the file extension, but the mime type, in my case I was
testing with an Excel OOXML file, which has the content-type:

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Note how this contains 'xml' in it.

The problem seems to actually be xml2enc (which is automatically enabled when
you do 'ProxyHTMLEnable On') - in particular this line of code:

https://github.com/apache/httpd/blob/trunk/modules/filters/mod_xml2enc.c#L347

namely:

    /* only act if starts-with "text/" or contains "xml" */
    if (strncmp(ctype, "text/", 5) && !strstr(ctype, "xml"))  {

The 'strstr' is matching any content-type that contains xml.

I'm unclear on the original intent of this line. It might make sense to look
for +xml rather than just xml, which would definitely fix this bug.

I appear to have been able to workaround this bug by disabling the xml2enc
module. (I think I don't need it in my use case.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscr...@httpd.apache.org
For additional commands, e-mail: bugs-h...@httpd.apache.org

Reply via email to