Neil, Ok, I've been reading through section 13 (13.2 specifically) of RFC 2616, and I think we're OK, (and justified) in allowing the developer of a Quixote application to specify the Expires header of a StaticFile or StaticDirectory. Perhaps the option to set the Expires header on StaticDirectory(s) is not so good ("... as long as the server's expiration times are carefully chosen," per 13.2.1), but it does at least offer a finer grained control mechanism than the Quixote Response object's default of "-1." Was there something in particular about the approach I took in addressing this that you aren't comfortable with? Existing code, perhaps, or some other short-sighted glitch on my end? If so, let me know, and I'll revisit my modification. Short of that, I think the ability to easily enable caching to function as intended is only a benefit for Quixote users and developers. Especially where applications with lots of images (or other 'StaticFiles') are concerned. Jason Sibre -----Original Message----- From: Neil Schemenauer [mailto:nascheme@mems-exchange.org]On Behalf Of Neil Schemenauer Sent: Thursday, June 19, 2003 3:46 PM To: Jason Sibre Cc: quixote-users@mems-exchange.org Subject: Re: [Quixote-users] Augmenting StaticFile to use "Expires:" On Sun, Jun 01, 2003 at 07:21:19PM -0500, Jason Sibre wrote: > I think this cleans things up nicely. cache_time now defaults to None, and > unless I did something silly, this will produce identical behavior (with > regard to the Expires header) to an un-patched util.py. I also fixed that > oversight about directories within directories (Thanks again for pointing > that out!) > > As before, I have two patches to submit, one for util.py files that are > 'stock' 0.6 release versions, which include both Graham's IMS support and my > Expires support, and another that will patch a util.py that has already been > patched for IMS support to include Expires support. Hi Jason, I think supporting the If-Modified-Since header would be a good idea. However, we need to be careful about being compliant with the HTTP 1.1 specification. We are probably not right now but we should be and I don't want to make things worse. I'm not saying there is something specifically wrong with your patch, I'm just being cautious. I would prefer to only support exact matches for the If-Modified-Since header. That makes the code simpiler and more robust. User agents are not supposed to mangle the Last-Modified date. Does anyone have an objection to only supporting exact matches? Adding a Last-Modified header when serving static files is definitely a good idea. I think that should probably be enabled by default. Neil