When accessing a Subversion repository via http:// URL using a web browser, mod_dav_svn returns a "Cache-Control: max-age=604800" header (only on files, not on directories).
This makes the web browser cache the file content for up to a week.
This makes a lot of sense when a fixed revision was requested, but URLs that imply HEAD, no Cache-Control should be sent. (Note that a Last-Modified header is always sent as well, which should be good enough AFAICT.)
(Cache-Control is sent but should not be, as no revision was requested.)
URLs like these should still return a Cache-Control header, as they contain an explicit revision:
URLs that point at directories never include a Cache-Control header. IMHO directories with explicit revisions should also have a Cache-Control header.
The main point of this issue however: do not confuse web browsers & force users to hard-reload a file URL of HEAD to see recent modifications.
The header is conditionally hardcoded in subversion/mod_dav_svn/repos.c around line 3050 as:
In pseudo code, I think this should become:
The GET params are 'r' and 'p'. It seems they don't accept "HEAD", so it might be enough to include the Cache-Control header iff a revision param is non-empty (not having looked through the code too closely yet).
Original issue reported by neels