mirror of https://github.com/apache/archiva.git
fix unit test due to bad previous commit
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/2.0.0-RC@1568842 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
86f5f926e3
commit
ae28a00e52
|
@ -107,7 +107,6 @@ import javax.servlet.http.HttpSession;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -416,8 +415,8 @@ public class ArchivaDavResourceFactory
|
||||||
catch ( DigesterException de )
|
catch ( DigesterException de )
|
||||||
{
|
{
|
||||||
throw new DavException( HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
|
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.setHeader( "Cache-Control", "no-cache" );
|
||||||
response.setDateHeader( "Last-Modified", new Date().getTime() );
|
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)
|
// 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() )
|
|| repositoryGroupConfiguration.getRepositories().isEmpty() )
|
||||||
{
|
{
|
||||||
File file =
|
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(),
|
return new ArchivaDavResource( file.getPath(), "groups/" + repositoryGroupConfiguration.getId(), null,
|
||||||
null,request.getDavSession(), locator, this,
|
request.getDavSession(), locator, this, mimeTypes, auditListeners, scheduler,
|
||||||
mimeTypes, auditListeners,
|
fileLockManager );
|
||||||
scheduler, fileLockManager );
|
|
||||||
}
|
}
|
||||||
List<File> mergedRepositoryContents = new ArrayList<File>();
|
List<File> mergedRepositoryContents = new ArrayList<File>();
|
||||||
// multiple repo types so we guess they are all the same type
|
// multiple repo types so we guess they are all the same type
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class RepositoryServletNoProxyTest
|
||||||
|
|
||||||
//WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/" + commonsLangSha1 );
|
//WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/" + commonsLangSha1 );
|
||||||
WebResponse response = getWebResponse( "/repository/internal/" + commonsLangSha1 );
|
WebResponse response = getWebResponse( "/repository/internal/" + commonsLangSha1 );
|
||||||
assertNotNull( response.getResponseHeaderValue( "last-modified" ) );
|
assertNotNull( response.getResponseHeaderValue( "Last-Modified" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -74,7 +74,7 @@
|
||||||
<redback.spring-utils.version>2.1</redback.spring-utils.version>
|
<redback.spring-utils.version>2.1</redback.spring-utils.version>
|
||||||
<redback.taskqueue.version>2.1</redback.taskqueue.version>
|
<redback.taskqueue.version>2.1</redback.taskqueue.version>
|
||||||
<slf4j.version>1.7.5</slf4j.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>
|
<spring.version>4.0.1.RELEASE</spring.version>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue