From: Olivier Lamy Date: Fri, 20 Jul 2012 21:37:00 +0000 (+0000) Subject: [MRM-1644] Archiva should set cache control headers instead of adding for maven-metad... X-Git-Tag: archiva-1.4-M3~504 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a7f6a8efe9f33baf9d8fc36a14125c871da3688e;p=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 --- 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) }