Return-Path: Delivered-To: apmail-maven-archiva-commits-archive@locus.apache.org Received: (qmail 55507 invoked from network); 26 Sep 2007 18:24:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Sep 2007 18:24:05 -0000 Received: (qmail 96543 invoked by uid 500); 26 Sep 2007 18:23:55 -0000 Delivered-To: apmail-maven-archiva-commits-archive@maven.apache.org Received: (qmail 96511 invoked by uid 500); 26 Sep 2007 18:23:55 -0000 Mailing-List: contact archiva-commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: archiva-dev@maven.apache.org Delivered-To: mailing list archiva-commits@maven.apache.org Received: (qmail 96500 invoked by uid 99); 26 Sep 2007 18:23:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2007 11:23:55 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2007 18:26:21 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E91821A9832; Wed, 26 Sep 2007 11:23:41 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r579747 - /maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/repository/ProxiedDavServer.java Date: Wed, 26 Sep 2007 18:23:41 -0000 To: archiva-commits@maven.apache.org From: joakime@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070926182341.E91821A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: joakime Date: Wed Sep 26 11:23:41 2007 New Revision: 579747 URL: http://svn.apache.org/viewvc?rev=579747&view=rev Log: [MRM-503] Metadata files need Pragma:no-cache response header. Applied Pragma and Cache-Control headers to maven-metadata.xml requests only. Added TODO for other filetypes. Modified: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/repository/ProxiedDavServer.java Modified: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/repository/ProxiedDavServer.java URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/repository/ProxiedDavServer.java?rev=579747&r1=579746&r2=579747&view=diff ============================================================================== --- maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/repository/ProxiedDavServer.java (original) +++ maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/repository/ProxiedDavServer.java Wed Sep 26 11:23:41 2007 @@ -146,12 +146,14 @@ } else { - // Create parent directories that don't exist when writing a file - // This actually makes this implementation not compliant to the - // WebDAV RFC - but we have enough knowledge - // about how the collection is being used to do this reasonably and - // some versions of Maven's WebDAV don't - // correctly create the collections themselves. + /* Create parent directories that don't exist when writing a file + * This actually makes this implementation not compliant to the + * WebDAV RFC - but we have enough knowledge + * about how the collection is being used to do this reasonably and + * some versions of Maven's WebDAV don't + * correctly create the collections themselves. + */ + File rootDirectory = getRootDirectory(); if ( rootDirectory != null ) { @@ -159,6 +161,15 @@ } } + // MRM-503 - Metadata file need Pragma:no-cache response header. + if ( request.getLogicalResource().endsWith( "/maven-metadata.xml" ) ) + { + response.addHeader( "Pragma", "no-cache" ); + response.addHeader( "Cache-Control", "no-cache" ); + } + + // TODO: determine http caching options for other types of files (artifacts, sha1, md5, snapshots) + davServer.process( request, response ); }