From a7f6a8efe9f33baf9d8fc36a14125c871da3688e Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 20 Jul 2012 21:37:00 +0000 Subject: [PATCH] [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 --- .../apache/archiva/webdav/ArchivaDavResourceFactory.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java index 8d59c7a90..6b4d395da 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java @@ -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) } -- 2.39.5