httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clodoaldo Neto <>
Subject [users@httpd] Conditional request not honored in Includes
Date Fri, 24 Jan 2014 17:25:38 GMT
I'm trying to dynamically concatenate a bunch of javascript files into a
single file using the INCLUDE filter. The include.shtml.js test script is

    <!--#include virtual="/static/script2.js" -->
    <!--#include virtual="/static/script1.js" -->

The virtual server config has both SSIETag and SSILastModified set to On
for that file

    <VirtualHost *:80>

        ServerName test.dkt
        UseCanonicalName Off
        ErrorLog logs/test.dkt-error_log
        CustomLog logs/test.dkt-access_log combined
        LogLevel info
        FileEtag All
        AddType application/javascript .js

        DocumentRoot /var/www/html/
        <Directory /var/www/html/>
            Options -Indexes
            ExpiresActive Off
            ExpiresDefault "access plus 1 years"
            Header append Cache-Control "public"
            Order deny,allow
            Allow from all

        <Directory /var/www/html/>
            <FilesMatch "\.shtml\.js$">
                SSIETag On
                SSILastModified On
                Options +Includes
                SetOutputFilter INCLUDE


It correctly serves the concatenated scripts but is always a full 200 OK in
instead of a 304 Not Modified. The Firebug log

    Response Headers
    HTTP/1.1 200 OK
    Date: Fri, 24 Jan 2014 16:57:12 GMT
    Server: Apache/2.2.15 (CentOS)
    Last-Modified: Fri, 24 Jan 2014 16:53:32 GMT
    Etag: "460bbc-5c-4f0ba32b7447d"
    Accept-Ranges: bytes
    Vary: Accept-Encoding
    Content-Encoding: gzip
    Cache-Control: public
    Content-Length: 40
    Connection: close
    Content-Type: application/javascript

    Request Headers
    GET /static/include.shtml.js HTTP/1.1
    Host: test.dkt
    User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Encoding: gzip, deflate
    DNT: 1
    Connection: keep-alive
    If-Modified-Since: Fri, 24 Jan 2014 16:53:32 GMT
    If-None-Match: "460bbc-5c-4f0ba32b7447d"
    Cache-Control: max-age=0

Is there a hard coded restriction on conditional requests for the INCLUDE

I'm aware that I should "touch" the including script whenever there is a
change in any of the included scripts. The Apache version is 2.2 running in
Centos 6

View raw message