Received: (qmail 18051 invoked by uid 2012); 3 Jun 1999 04:20:34 -0000 Message-Id: <19990603042034.18050.qmail@hyperreal.org> Date: 3 Jun 1999 04:20:34 -0000 From: Mark Nottingham Reply-To: mnot@pobox.com To: apbugs@hyperreal.org Subject: mod_autoindex does not generate Last-Modified response headers X-Send-Pr-Version: 3.2 >Number: 4520 >Category: mod_autoindex >Synopsis: mod_autoindex does not generate Last-Modified response headers >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: apache >Arrival-Date: Wed Jun 2 21:30:00 PDT 1999 >Closed-Date: Tue Jul 17 23:53:48 PDT 2001 >Last-Modified: Tue Jul 17 23:53:48 PDT 2001 >Originator: mnot@pobox.com >Release: 1.3.6 >Organization: >Environment: all >Description: Because mod_autoindex does not generate LM headers, web caches cannot validate these pages, making them essentially uncacheable (an Expires or a max-age can be set, but that only does so much good; the index has to be re-downloaded in full after it expires). Because the module already does a stat for every file that it lists, it would be relatively easy to compute a LM based on the most recently modified file that it knows of (including HEADER, README, etc). >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: State-Changed-From-To: open-suspended State-Changed-By: coar State-Changed-When: Fri Jun 4 13:59:55 PDT 1999 State-Changed-Why: This is not practicable. mod_autoindex only stats every file for FancyIndexed displays, and it doesn't scan the directory until after it has sent the response header. Adding the behaviour you request would require that the file scan be completed, and the Header and Readme files be examined but not sent, before the response header is sent back to the client. In the case of very large directories this could delay the response for a significant interval, which is not good. There appears to be no clear way to do this with the current design, but it would definitely be a nice feature -- so I'm suspending this report for future consideration rather than closing it. From: "Mark Nottingham" To: Cc: Subject: mod_autoindex/4520: mod_autoindex does not generate Last-Modified response headers Date: Sat, 5 Jun 1999 18:54:26 +1000 > This is not practicable. mod_autoindex only stats every > file for FancyIndexed displays, and it doesn't scan the > directory until after it has sent the response header. > Adding the behaviour you request would require that the > file scan be completed, and the Header and Readme files > be examined but not sent, before the response header is > sent back to the client. In the case of very large > directories this could delay the response for a significant > interval, which is not good. I see your point. It's interesting; autoindex also doesn't send a Content-Length header, which rules out persistent connections (with both caches and browsers). I wonder where the break point between the cost of processing everything and the network benefits of full metainformation is? The gains made by persistance are fairly well-researched. What portion of a particular resource's client population comes through a cache is more slippery, but would be considerable for popular ones. A possible implementation might stat the directory to decide if it's small enough to justify the cost of computing the headers, or allow the user to configure whether they want them sent (possibly something like AutoIndexGenMeta or somesuch, defaulting to true, allowing people with very large directories to turn it off). Just something to think about (as if you guys don't have enough to do ;-). Thanks, Comment-Added-By: wrowe Comment-Added-When: Tue Jul 17 23:52:54 PDT 2001 Comment-Added: This behavior can be enabled on 1.3.20, and is enabled by default on 2.0. State-Changed-From-To: suspended-closed State-Changed-By: wrowe State-Changed-When: Tue Jul 17 23:53:47 PDT 2001 State-Changed-Why: whoops... missed a box. This is a closed issue. >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]