[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 06:32:19 CET

On Mon, 28 Nov 2005, Daniel Rall wrote:

> On Sat, 26 Nov 2005, Greg Stein wrote:
> /* 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

#define's aside, this was a straight copy out of
httpd/modules/dav/fs/repos.c, which I believe was used as the template
for mod_dav_svn.

> 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().

Done in r17549.

> > 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 */

Or did you mean versioned resources like files and directories?
Assuming so, the implementation would resemble something like the
get_last_modified(resource) function introduced in r17549, and
repos.c:dav_svn_set_headers() would include a header of
"Cache-Control: max-age=MAX_SECONDS" in the response (where
MAX_SECONDS is some big apr_time_t I haven't figured out yet).

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 06:33:59 2005

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