[MRM-1644] Archiva should set cache control headers instead of adding for maven-metadata.xml

Submitted by Charles Kim.

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1363958 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-07-20 21:37:00 +00:00
parent 75998ea77d
commit a7f6a8efe9
1 changed files with 3 additions and 3 deletions

View File

@ -844,12 +844,12 @@ public class ArchivaDavResourceFactory
// header.
if ( locator.getResourcePath().endsWith( "/maven-metadata.xml" ) )
{
response.addHeader( "Pragma", "no-cache" );
response.addHeader( "Cache-Control", "no-cache" );
response.setHeader( "Pragma", "no-cache" );
response.setHeader( "Cache-Control", "no-cache" );
}
// We need to specify this so connecting wagons can work correctly
response.addDateHeader( "last-modified", resource.getModificationTime() );
response.setDateHeader( "last-modified", resource.getModificationTime() );
// TODO: [MRM-524] determine http caching options for other types of files (artifacts, sha1, md5, snapshots)
}