marc 98/09/04 11:15:48
Modified: htdocs/manual upgrading_to_1_3.html
htdocs/manual/mod mod_expires.html
src CHANGES
src/modules/standard mod_expires.c
Log:
Fix mod_expires to add Expires headers for content that isn't served
from disk (ie. the case where r->finfo.st_mode == 0), unless it is
a modification date based setting.
Submitted by: Paul Phillips <[EMAIL PROTECTED]>
Revision Changes Path
1.29 +6 -0 apache-1.3/htdocs/manual/upgrading_to_1_3.html
Index: upgrading_to_1_3.html
===================================================================
RCS file: /export/home/cvs/apache-1.3/htdocs/manual/upgrading_to_1_3.html,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- upgrading_to_1_3.html 1998/08/31 01:18:45 1.28
+++ upgrading_to_1_3.html 1998/09/04 18:15:44 1.29
@@ -72,6 +72,12 @@
<H3>Run-Time Configuration Changes</H3>
<UL>
+ <LI>As of 1.3.2, <A
HREF="mod/mod_expires.html"><CODE>mod_expires</CODE></A>
+ will add Expires headers to content that does not come from a file
+ on disk, unless you are using a modification time based setting.
+ Previously, it would never add an Expires header unless content came
+ from a file on disk. This could result in Expires headers being added
+ in places where they were not previously added.
<LI>Standalone <STRONG><SAMP>FancyIndexing</SAMP></STRONG> directives
are now combined with the settings of any <SAMP>IndexOptions</SAMP>
directive already in effect, rather than replacing them.
1.11 +5 -0 apache-1.3/htdocs/manual/mod/mod_expires.html
Index: mod_expires.html
===================================================================
RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/mod_expires.html,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- mod_expires.html 1998/05/20 14:12:56 1.10
+++ mod_expires.html 1998/09/04 18:15:45 1.11
@@ -316,6 +316,11 @@
ExpiresByType image/gif "modification plus 5 hours 3 minutes"</CODE>
</DD>
</DL>
+ <P>
+ Note that if you use a modification date based setting, the Expires
+ header will <STRONG>not</STRONG> be added to content that does
+ not come from a file on disk. This is due to the fact that there is
+ no modification time for such content.
<!--#include virtual="footer.html" -->
</BODY>
1.1046 +7 -0 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1045
retrieving revision 1.1046
diff -u -r1.1045 -r1.1046
--- CHANGES 1998/09/03 22:40:39 1.1045
+++ CHANGES 1998/09/04 18:15:46 1.1046
@@ -1,5 +1,12 @@
Changes with Apache 1.3.2
+ *) mod_expires will now act on content that is not sent from a file
+ on disk. Previously it would never add an Expires: header to
+ any response that did not come from a file on disk; the only
+ case where it still doesn't (and can't) add one for that type of
+ content is if you are using a modification date based setting.
+ [Marc Slemko, Paul Phillips <[EMAIL PROTECTED]>]
+
*) Problems encountered during .htaccess parsing or CGI execution
that lead to a "500 Server Error" condition now provide explanatory
text (in the *ERROR_NOTES envariable) to ErrorDocument 500 scripts.
1.31 +6 -3 apache-1.3/src/modules/standard/mod_expires.c
Index: mod_expires.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_expires.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- mod_expires.c 1998/08/25 09:15:38 1.30
+++ mod_expires.c 1998/09/04 18:15:47 1.31
@@ -413,9 +413,6 @@
if (r->main != NULL) /* Say no to subrequests */
return DECLINED;
- if (r->finfo.st_mode == 0) /* no file ? shame. */
- return DECLINED;
-
conf = (expires_dir_config *) ap_get_module_config(r->per_dir_config,
&expires_module);
if (conf == NULL) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
@@ -454,6 +451,12 @@
switch (code[0]) {
case 'M':
+ if (r->finfo.st_mode == 0) {
+ /* file doesn't exist on disk, so we can't do anything based on
+ * modification time. Note that this does _not_ log an error.
+ */
+ return DECLINED;
+ }
base = r->finfo.st_mtime;
additional = atoi(&code[1]);
break;