httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject [patch] 1.3.15-dev mod_autoindex (2.0 would commit in parallel)
Date Wed, 01 Nov 2000 16:09:40 GMT

I became frustrated with the binaries yesterday, having pulled
up old, dirty listings of Daniel's folder, and then the /dist/binaries
list.  Please review the following patch and comment, I'm
prepared to commit this afternoon if I have sufficient +1's.

* Enables Last-Modified and ETag response headers for
  mod_autoindex'ed directories, to prevent caching issues.

Caviats:  File systems with bad mtime logic will pose a problem.
e.g., Win32/Win9x will always return the create date.  A define 
won't cure the problem (it's a run-time condition.)  [WinNT will
return the current time on FAT volumes, and the modified date on
NTFS volumes, which seems more reasonable.]  Since Win9x isn't a
production platform, I'm not so worried.

HEADER.foo and FOOTER.foo aren't factored, only the directory 
contents revision date is addressed by this patch.  If HEADER and
FOOTER reside in the same directory, then this is a non-issue (their
change affects the parent directory.)

Amusing side note... /test/ and /TEST/ return the same etag on Win32,
clearly indicating they are identical.

Comments?

Index: mod_autoindex.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_autoindex.c,v
retrieving revision 1.114
diff -u -r1.114 mod_autoindex.c
--- mod_autoindex.c 2000/02/02 20:44:01 1.114
+++ mod_autoindex.c 2000/11/01 16:38:21
@@ -1615,7 +1615,10 @@
     }
 
     r->content_type = "text/html";
-
+    ap_update_mtime(r, r->finfo.st_mtime);
+    ap_set_last_modified(r);
+    ap_set_etag(r);
+    
     ap_send_http_header(r);
 
     if (r->header_only) {




Mime
View raw message