[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Last-Modified HTTP header from mod_dav_svn

From: Daniel Rall <dlr_at_collab.net>
Date: 2005-11-29 00:32:27 CET

On Sat, 26 Nov 2005, Greg Stein wrote:

> On Fri, Nov 25, 2005 at 10:57:31PM +0200, Kalle Olavi Niemitalo wrote:
> >...
> > However, if a "casual HTTP browser" contacts a Subversion repository,
> > it will be using GET, which could be cacheable.
>
> Yup.
>
> >...
> > I suppose there could be two advantages with reporting Last-Modified
> > in addition to ETag:
> >
> > - Perhaps some older caches support Last-Modified but not ETag.
> >
> > - A cache can guess an expiry date based on how long the resource
> > has already been unmodified.
> >
> > - RFC 2616 section 13.3.4 says servers SHOULD do so.
>
> This last part is good enough. We have the date, so we may as well put
> it into the response (depending upon the type of resource, of course).

Looks like there are already some reminders in repos.c:

  /* make sure the proper mtime is in the request record */
#if 0
  ap_update_mtime(r, resource->info->finfo.mtime);
#endif

  /* ### note that these use r->filename rather than <resource> */
#if 0
  ap_set_last_modified(r);
#endif

I'm working on activating these, pulling the value of the "svn:date"
revprop using svn_fs_node_created_rev() and svn_fs_revision_prop().

> For (at least) version resources, we should also be setting the
> Cache-Control header. The max-age should be set to some ridiculously
> high number since a version resource can't change.

Greg, are you referring to this specific type (from mod_dav.h)?:

    DAV_RESOURCE_TYPE_VERSION, /* version or baseline URL */

-- 
Daniel Rall
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 29 00:33:14 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.