mirror of https://github.com/apache/archiva.git
[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:
parent
75998ea77d
commit
a7f6a8efe9
|
@ -844,12 +844,12 @@ public class ArchivaDavResourceFactory
|
||||||
// header.
|
// header.
|
||||||
if ( locator.getResourcePath().endsWith( "/maven-metadata.xml" ) )
|
if ( locator.getResourcePath().endsWith( "/maven-metadata.xml" ) )
|
||||||
{
|
{
|
||||||
response.addHeader( "Pragma", "no-cache" );
|
response.setHeader( "Pragma", "no-cache" );
|
||||||
response.addHeader( "Cache-Control", "no-cache" );
|
response.setHeader( "Cache-Control", "no-cache" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// We need to specify this so connecting wagons can work correctly
|
// 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)
|
// TODO: [MRM-524] determine http caching options for other types of files (artifacts, sha1, md5, snapshots)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue