]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1644] Archiva should set cache control headers instead of adding for maven-metad...
authorOlivier Lamy <olamy@apache.org>
Fri, 20 Jul 2012 21:37:00 +0000 (21:37 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 20 Jul 2012 21:37:00 +0000 (21:37 +0000)
Submitted by Charles Kim.

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1363958 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java

index 8d59c7a9069db79f8c2225953ee1b79e9261330b..6b4d395da22e3551fe1e15e0b072f1afe12e33e0 100644 (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)
     }