archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1568841 - in /archiva/trunk: ./ archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/
Date Sun, 16 Feb 2014 21:58:27 GMT
Author: olamy
Date: Sun Feb 16 21:58:26 2014
New Revision: 1568841

URL: http://svn.apache.org/r1568841
Log:
fix unit test due to bad previous commit

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
    archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/RepositoryServletNoProxyTest.java
    archiva/trunk/pom.xml

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java?rev=1568841&r1=1568840&r2=1568841&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
Sun Feb 16 21:58:26 2014
@@ -107,7 +107,6 @@ import javax.servlet.http.HttpSession;
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -416,8 +415,8 @@ public class ArchivaDavResourceFactory
                         catch ( DigesterException de )
                         {
                             throw new DavException( HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
-                                                    "Error occurred while generating checksum
files." + de.getMessage()
-                            );
+                                                    "Error occurred while generating checksum
files."
+                                                        + de.getMessage() );
                         }
                     }
                 }
@@ -877,6 +876,11 @@ public class ArchivaDavResourceFactory
             response.setHeader( "Cache-Control", "no-cache" );
             response.setDateHeader( "Last-Modified", new Date().getTime() );
         }
+        else
+        {
+            // We need to specify this so connecting wagons can work correctly
+            response.setDateHeader( "Last-Modified", resource.getModificationTime() );
+        }
         // TODO: [MRM-524] determine http caching options for other types of files (artifacts,
sha1, md5, snapshots)
     }
 
@@ -988,12 +992,11 @@ public class ArchivaDavResourceFactory
             || repositoryGroupConfiguration.getRepositories().isEmpty() )
         {
             File file =
-                new File( System.getProperty( "appserver.base"), "groups/" + repositoryGroupConfiguration.getId()
);
+                new File( System.getProperty( "appserver.base" ), "groups/" + repositoryGroupConfiguration.getId()
);
 
-            return new ArchivaDavResource( file.getPath(), "groups/" + repositoryGroupConfiguration.getId(),
-                                           null,request.getDavSession(), locator, this,
-                                           mimeTypes, auditListeners,
-                                           scheduler, fileLockManager );
+            return new ArchivaDavResource( file.getPath(), "groups/" + repositoryGroupConfiguration.getId(),
null,
+                                           request.getDavSession(), locator, this, mimeTypes,
auditListeners, scheduler,
+                                           fileLockManager );
         }
         List<File> mergedRepositoryContents = new ArrayList<File>();
         // multiple repo types so we guess they are all the same type

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/RepositoryServletNoProxyTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/RepositoryServletNoProxyTest.java?rev=1568841&r1=1568840&r2=1568841&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/RepositoryServletNoProxyTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/RepositoryServletNoProxyTest.java
Sun Feb 16 21:58:26 2014
@@ -62,7 +62,7 @@ public class RepositoryServletNoProxyTes
 
         //WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/"
+ commonsLangSha1 );
         WebResponse response = getWebResponse( "/repository/internal/" + commonsLangSha1
);
-        assertNotNull( response.getResponseHeaderValue( "last-modified" ) );
+        assertNotNull( response.getResponseHeaderValue( "Last-Modified" ) );
     }
 
     @Test

Modified: archiva/trunk/pom.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/pom.xml?rev=1568841&r1=1568840&r2=1568841&view=diff
==============================================================================
--- archiva/trunk/pom.xml (original)
+++ archiva/trunk/pom.xml Sun Feb 16 21:58:26 2014
@@ -74,7 +74,7 @@
     <redback.spring-utils.version>2.1</redback.spring-utils.version>
     <redback.taskqueue.version>2.1</redback.taskqueue.version>
     <slf4j.version>1.7.5</slf4j.version>
-    <log4j.version>2.0-beta9</log4j.version>
+    <log4j.version>2.0-rc1</log4j.version>
 
     <spring.version>4.0.1.RELEASE</spring.version>
 



Mime
View raw message