httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: [PATCH] for mod_autoindex: no-sorting, last-modified
Date Tue, 21 Oct 1997 01:06:52 GMT

On Mon, 20 Oct 1997, Rodent of Unusual Size wrote:

>     Okey, here's an improved (?) patch over the one submitted.  It
>     o adds the IndexOptions keyword "SuppressColumnSorting"


>     o sets the Last-Modified to the mtime of the directory if possible;
>       if stat(r->filename) fails (as it probably will on OS/2), no
>       Last-Modified is set.  (I find the alternative - waiting until the
>       directory has been scanned and setting it to the newest file - to
>       be nearly pinning my bogometer.)

No, setting last-modified based on mtime of . is bogus if ScanHTMLTitles
is set (or whatever it's called).  It's also bogus if there's a README, a
HEADER, or a FOOTER.  In fact it's just like XBitHack Full with g+x.  So
I'm a big +0 on this.

I'd +1 any of the following (or combos):

    - there was a flag enabling it, default off

    - it was enabled by default if none of the above issues exist (i.e.
	do the relatively cheap tests to see if ScanHTMLTitles is
	set, and if any README/HEADER/FOOTER exist -- this has "constant"

    - like last, but use the max of the mtimes of the README/HEADER/FOOTER
	subrequests and the . mtime

The full solution would actually to be to use the max(mtime) over all
mtimes of all subrequests, and do the subreq_lookups all before doing the
headers.  This is not much different from how it's done now -- except that
the header delay could make it look slower to the user. 

Once you've gone to that expense, you can also do an md5sum over all the
ETags and issue a weak ETag as well. 

It's a simpler problem than issuing Last-Modified/ETag for mod_include ... 
but it's a similar problem. 

>     If voted in, the actual patch will be much bigger due to indent
>     issues I fixed along the way - but they'll be cosmetic only.

-1, please don't commit indentation changes along with code fixes.  Do it
in two commits.  Otherwise it makes the one diff very hard to read. 


P.S. Oh, btw, several times now I've thought how nice it would be to have
a ServingCache directory which is writable by the httpd userid, under
which it creates cached information about the normal directory hierarchy.
So it could actually cache the output of these things (and other things,
like md5-content).  With the separate hierarchy you don't have to worry
so much about mucking with your content tree.

View raw message