httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <>
Subject Re: SSI Execution and the "XBitHack On" Directive
Date Fri, 07 Jun 2002 07:06:30 GMT
The reason is probably simple. When you first get the page, it is parsed, and thereby dynamic,
so the browser will handle caching in another way than static pages. Therefor, when you retrieve
it next time, without the "xbit", it wont use the cached one and you get a new where the SSI
isn't parsed. Why you don't get it parsed after setting back the "xbit", is probably due to
that chmod does not change the file's modification date/time, and the browser will include
a If-Modified-Since header in the request (as the last one it retrieved was a static page),
and Apache determines that the file hasn't been modified and sends a "NOT MODIFIED" response.
  ----- Original Message ----- 
  From: Ron Wingfield 
  Sent: Monday, June 03, 2002 11:16 PM
  Subject: SSI Execution and the "XBitHack On" Directive

  I have analyzed a series of conditions that appear extraordinary to the method discussed
in the SSI Tutorial, .  I have a simple, proof-of-concept
SSI instruction in an index.htm file that gets the local date, i.e.,

           <!--#echo var="DATE_LOCAL"-->

  Per the previously referenced tutorial, I have created a .htaccess file in the same directory
of the index.htm file, and changed the file mode of the index.htm file to 755 , i.e., executable,
to take advantage of the "XBitHack on" directive which I've included in the .htaccess file,
per the following:

          Options +Includes
          XbitHack On

  The scenario appears to work, i.e., the date appears in the client's (MS/Explorer 5+) display
of the html document.  As an academic exercise, I elect to change the mode of the index.htm
file to 444, there by removing the TRUE state of all execute bits.  As expected, the index.htm
file will no longer display the date string after clicking the Refresh button on MS/Explorer
5+.   So far, so good.  

  The next step in this exercise, is to reassert the execute bit, i.e., chmod 755 index.htm.
 This time, refreshing from MS/Explorer does refresh the panel; however, the SSI instruction
will not execute.  I have discovered that I can simply rewrite the index.htm file from vi,
. . .without changing anything (i.e., document text), and the SSI instruction will then execute.
 I can consistently recreate this scenario.

  How does this action of touching the index.htm file relate to the executable bit scenario?
 I assume that the rewrite's effect of changing the last-touched-date has something to do
with the perception by Apache that the file needs to be revisited? 

  Ron Wingfield

View raw message