Received: (qmail 94057 invoked by uid 501); 1 Jul 2001 10:45:01 -0000 Message-Id: <20010701104501.94056.qmail@apache.org> Date: 1 Jul 2001 10:45:01 -0000 From: Pekka Savola Reply-To: pekkas@netcore.fi To: submit@bugz.apache.org Subject: mime_magic_module + little-endian data => internal server error X-Send-Pr-Version: 3.110 >Number: 7964 >Category: mod_mime >Synopsis: mime_magic_module + little-endian data => internal server error >Confidential: no >Severity: serious >Priority: medium >Responsible: trawick >State: analyzed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Sun Jul 01 03:50:01 PDT 2001 >Closed-Date: >Last-Modified: Fri Mar 15 14:27:27 PST 2002 >Originator: pekkas@netcore.fi >Release: 1.3.19 >Organization: >Environment: FreeBSD 4.3 on i386, Linux >Description: Iff mime_magic_module is enabled, and you have little-endian data (might be some other data types too, but I came across this one): # file data data: RIFF (little-endian) data You _always_ get a 500 internal server error when you try to access the file. Turning mime_magic off fixes this. >How-To-Repeat: Download the data example (server has mime_magic disabled) from: http://www.netcore.fi/pekkas/riff_data and try. >Fix: Enhance mime_magic to be more robust somehow ;-) >Release-Note: >Audit-Trail: State-Changed-From-To: open-analyzed State-Changed-By: trawick State-Changed-When: Tue Aug 21 04:01:54 PDT 2001 State-Changed-Why: (Note: I have been researching this problem using Apache 2.0, though I think it should be the same in 1.3.) A simple work-around appears to be to remove the tab character at the end of the line 0 string RIFF audio/unknown in the magic file. I think the parser of the file mistakenly stores the tab character as part of the mime type. At run-time, we've selected this mime type ("audio/unknown\t") but we don't store it in the request because when parsing it again we are confused by the tab. Changes contemplated for Apache 2.0 include 1) log something! an internal server error generated from an Apache module with no error log is nasty 2) remove such tabs from the distributed magic file and/ or add logic to the file parsing code to ignore the tabs Thanks for your report, and thanks for using Apache! Responsible-Changed-From-To: apache-trawick Responsible-Changed-By: trawick Responsible-Changed-When: Tue Aug 21 04:01:54 PDT 2001 Responsible-Changed-Why: I have some preliminary code and expect to have it ready soon. Comment-Added-By: aaron Comment-Added-When: Fri Mar 15 14:27:27 PST 2002 Comment-Added: FYI: a fix was committed to 2.0 but not to 1.3, as far as I can tell >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]