You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Kevin Martin <si...@pair.com> on 2000/12/11 05:33:37 UTC

mod_autoindex/6957: HeaderName directive doesn't work for some filenames.

>Number:         6957
>Category:       mod_autoindex
>Synopsis:       HeaderName directive doesn't work for some filenames.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Sun Dec 10 20:40:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     sigma@pair.com
>Release:        1.3.14
>Organization:
apache
>Environment:
FreeBSD 4.1.1-STABLE, gcc 2.95.2
>Description:
"HeaderName filename" directive does not work for filenames with no
extension, nor for filenames without a specifically defined MIME type.
So "HeaderName headerfile" fails, even if DefaultType is set to
text/plain, while "HeaderName headerfile.txt" succeeds, because "txt"
is defined as "text/plain" in mime.types.
This is a change from older Apache 1.3.x behavior.
>How-To-Repeat:
Setup a directory with two files in it named "h" and "h.txt".
Create ".htaccess" with the entry "HeaderName h" and then view
the directory index through Apache.  Try again with "HeaderName h.txt".
>Fix:
Maybe mod_autoindex isn't checking the default MIME type to make sure
it knows how to handle the header file its given?
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <ap...@Apache.Org> 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!     ]