httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 15923] New: - Directory Index, Content Negotiation Does Not Work in <DirectoryIndex> under Apache 2.0.43
Date Thu, 09 Jan 2003 16:19:29 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15923>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15923

Directory Index, Content Negotiation Does Not Work in <DirectoryIndex> under Apache
2.0.43

           Summary: Directory Index, Content Negotiation Does Not Work in
                    <DirectoryIndex> under Apache 2.0.43
           Product: Apache httpd-2.0
           Version: 2.0.43
          Platform: PC
               URL: http://rinse.wov.idv.tw:50080/
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: imacat@mail.imacat.idv.tw


I had built a standard httpd, which includes mod_mime, mod_dir,
mod_autoindex and mod_negotiation.  Also I was using content negotiation on my
multi-lingual website.  But content negotiation failed on the directory index
when it is under some <DirectoryMatch>.

    I tried to build a simpliest environment.  I built Apache as:

imacat@rinse ~ % /usr/sbin/httpd2 -l
Compiled in modules:
  core.c
  worker.c
  http_core.c
  mod_mime.c
  mod_autoindex.c
  mod_negotiation.c
  mod_dir.c
imacat@rinse ~ %

    My document root is:

imacat@rinse ~ % ls /var/tmp/htdocs
index.html.en  index.html.zh-tw
imacat@rinse ~ %

    If my httpd.conf is:

imacat@rinse ~ % cat /etc/apache/httpd2.conf
User            nobody
Group           nogroup
DocumentRoot    /var/tmp/htdocs
PidFile         /var/run/httpd2.pid
Listen          50080
LogLevel        debug
ErrorLog        /var/log/apache/error_log
Options         +MultiViews
DirectoryIndex  index.html

AddLanguage             en              .en
AddLanguage             zh-tw           .zh-tw
LanguagePriority        zh-tw en
imacat@rinse ~ % /usr/sbin/httpd2 -t -f /etc/apache/httpd2.conf
Syntax OK
imacat@rinse ~ %

    Then I can work properly.

imacat@rinse ~ % lynx -dump http://localhost:50080/
                            Test Page index.html.en

   This is test page index.html.en.
imacat@rinse ~ % lynx -dump http://localhost:50080/index.html
                            Test Page index.html.en

   This is test page index.html.en.
imacat@rinse ~ %

    But if I add an arbitrarily <DirectoryMatch> there:

imacat@rinse ~ % cat /etc/apache/httpd2.conf
User            nobody
Group           nogroup
DocumentRoot    /var/tmp/htdocs
PidFile         /var/run/httpd2.pid
Listen          50080
LogLevel        debug
ErrorLog        /var/log/apache/error_log
Options         +MultiViews
DirectoryIndex  index.html

AddLanguage             en              .en
AddLanguage             zh-tw           .zh-tw
LanguagePriority        zh-tw en

<DirectoryMatch /var/tmp/htdocs>
</DirectoryMatch>
imacat@rinse ~ % /usr/sbin/httpd2 -t -f /etc/apache/httpd2.conf
Syntax OK
imacat@rinse ~ %

    Then it breaks the content-negotiation on the directory index:

imacat@rinse ~ % lynx -dump http://localhost:50080/
                                  Index of /

     * [1]index.html.en
     * [2]index.html.zh-tw

References

   1. http://localhost:50080/index.html.en
   2. http://localhost:50080/index.html.zh-tw
imacat@rinse ~ % lynx -dump http://localhost:50080/index.html
                            Test Page index.html.en

   This is test page index.html.en.
imacat@rinse ~ % cp /var/tmp/htdocs/index.html.en /var/tmp/htdocs/index.html
imacat@rinse ~ % lynx -dump http://localhost:50080/

                            Test Page index.html.en

   This is test page index.html.en.
imacat@rinse ~ % 

    It breaks if directory index and content negotiation work together
under some <DirectoryMatch>.  But they work well seperately.

    My environment is Linux 2.4.20, Debian 3.0r0, gcc 3.2.1, glibc 2.3.1.  But I
have also tested it on an Linux 2.4.20, Red Hat 7.3, gcc 3.2.1, glibc 2.2.5;
Linux 2.4.20, Red Hat 7.3, gcc 2.96, glibc 2.2.5; Linux 2.4.20, Debian 3.0r0,
gcc 2.95, glibc 2.2.5.  Please tell me if you have any question about the above
procedure.

    Please tell me if you need more infomation or help on this problem.

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


Mime
View raw message