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

Last-Modified HTTP header in GET responses

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Wed, 30 Dec 2015 17:50:37 +0300

Currently mod_dav_svn sets ETag and Last-Modified HTTP headers for GET
responses. These headers are optional and and are not used by
Subversion client. But they used by browsers and intermediate proxies
to cache responses.

ETag header is cheap to construct: it's just last modification
revision number of the node.

Last-Modified header is relatively expensive to calculate: it's
svn:date revision property of revision where path was modified.
Revision properties are mutable and cannot be cached effectively.The
other minor problem with Last-Modified header: svn:date revision
property can be changed to any value, while RFC 7223 requires
Last-Modified date to be earlier than the server's time of message
origination (Date) [1]

All browsers support ETag header (it's HTTP/1.1 header) and RFC 7232
recommends to prefer using ETag instead of Last-Modified [2].

Given all above I propose to stop adding Last-Modified header for HTTP
GET responses.

[1] https://tools.ietf.org/html/rfc7232#section-2.2.1
[2] https://tools.ietf.org/html/rfc7232#section-3.3

-- 
Ivan Zhakov

Received on 2015-12-30 15:51:15 CET

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