[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#363964: apache2: timefmt config not working in SSI when using INCLUDES output filter and XBitHack on



Package: apache2
Version: 2.0.54-5
Severity: normal

Using the following setup:
in apache2.conf, default setting for handling shtml files):
<FilesMatch "\.shtml(\..+)?$">
    SetOutputFilter INCLUDES
</FilesMatch>

in Directory directive:
        <Directory /var/www/test>
                Options +Includes
                XBitHack On
        </Directory>

following SSI code on a webpage:
cat /var/www/test/foo.shtml
<!--#config timefmt="%Y" -->
Today is <!--#echo var="DATE_LOCAL" -->

Web page is called .shtml and is executable:
chmod +x /var/www/test/foo.shtml

Output of this command is:
Today is Thursday, 20-Apr-2006 12:34:11 PDT

instead of correct
Today is 2006

Thus, SSI statements are parsed but timefmt is ignored.


Potential workarounds:
- Remove XBitHack On
- Replace shtml handling in apache2.conf with
  AddHandler server-parsed .shtml
- Remove executable flag on web page
- Rename web page to .html


Note:
The settings depend on the name of file containing the timefmt statement 
but the x bit of the file referenced in the URI.

Example: 
User goes to http://localhost/test/foo2.html
foo2.html has x bit set
foo2.html contains: <!--#include virtual="foo.shtml" -->
foo.shtml contains above example code but does NOT have the x bit set
Problem still appears


Note:
Found one reference to the same or similar problem here:
http://www.columbia.edu/acis/dev/unixdev/doc/www2-transition-issues.shtml#config

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)

Versions of packages apache2 depends on:
ii  apache2-mpm-prefork           2.0.54-5   traditional model for Apache2

-- no debconf information



Reply to: