You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/12/08 07:34:36 UTC

DO NOT REPLY [Bug 41130] New: - mod_mime and mod_negotiation type-map both clobber each other

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41130>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41130

           Summary: mod_mime and mod_negotiation type-map both clobber each
                    other
           Product: Apache httpd-2
           Version: 2.2.3
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: All
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: bug.apache.amc+0+@nicemice.net


Consider a type-map containing this entry:

URI: hello.ext
Content-Type: application/foo

Suppose some config file or .htaccess file says:

AddType application/bar ext

mod_negotation and mod_mime will fight each other and neither will have a clear
victory.  A request with Accept: application/bar will not get hello.ext, and a
request with Accept: application/foo will get hello.ext in a response that says
Content-Type: application/bar!

I think apache should be self-consistent.  It shouldn't choose a file because
it's one type and then return it as another type.  The Content-Type: in the
type-map, because it applies specifically to a single file, should override the
AddType directive that applies generally to files with a certain extension.

I don't know whether the hook order should be rearranged, or find_ct() should be
altered to avoid clobbering data that mod_negotiation has already filled in.

I don't know what priority/severity this is, so I left the defaults.  Someone
more experienced may want to adjust them.

This probably affects many or all operating systems, but I observed it only on
Linux.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org