From nobody@hyperreal.com Thu Feb 20 09:23:03 1997 Received: by taz.hyperreal.com (8.8.4/V2.0) id JAA21306; Thu, 20 Feb 1997 09:23:03 -0800 (PST) Message-Id: <199702201723.JAA21306@taz.hyperreal.com> Date: Thu, 20 Feb 1997 09:23:03 -0800 (PST) From: David Bronder Reply-To: David-Bronder@uiowa.edu To: apbugs@hyperreal.com Subject: AddHandler (and others?) doesn't match the extension properly X-Send-Pr-Version: 3.2 >Number: 181 >Category: mod_mime >Synopsis: AddHandler (and others?) doesn't match the extension properly >Confidential: no >Severity: critical >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Thu Feb 20 09:30:01 1997 >Last-Modified: Tue Apr 15 04:19:33 PDT 1997 >Originator: David-Bronder@uiowa.edu >Organization: >Release: 1.2b6 >Environment: AIX 4.1.4, C for AIX >Description: The AddHandler directive (and presumably the other related directives) doesn't properly match the given extension. It will declare a match if the extension string appears anywhere in the filename, not just at the end. For example, given the directive "AddHandler imap-file map", the filename "main.map" will match, but so will "campus.map.html". This can severely limit the available namespace for files to be served. >How-To-Repeat: http://fire.weeg.uiowa.edu/test/bob-map.html works as expected. http://fire.weeg.uiowa.edu/test/bob.map.html is processed as an image map file (the srm.conf file contains the "AddHandler imap-file map" directive). >Fix: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: pcs State-Changed-When: Tue Apr 15 04:19:33 PDT 1997 State-Changed-Why: This is the correct behavior. Multiple file extensions can be used to give various types of meta information, such as handler, language, mime type and encoding. It will always honor all extensions. As a workaround, if you want to hide an extension, you could use an extension which has no meaning - which will make all extensions to the _left_ of this one ignored. E.g. file.map.xxx.html - the 'map' extension will be ignored, provided 'xxx' is not defined as a mime type, languague, handler or encoding. >Unformatted: