getResourceFromGroup( request, repoGroupConfig.getRepositories(), archivaLocator,
repoGroupConfig );
- setHeaders( response, locator, davResource );
+ setHeaders( response, locator, davResource, true );
return davResource;
auditListeners, //
scheduler, //
fileLockManager );
- setHeaders( response, locator, resource );
+ setHeaders( response, locator, resource, false );
return resource;
}
}
}
}
- setHeaders( response, locator, resource );
+ setHeaders( response, locator, resource, false );
// compatibility with MRM-440 to ensure browsing the repository works ok
if ( resource.isCollection() && !request.getRequestURI().endsWith( "/" ) )
this.auditListeners.remove( listener );
}
- private void setHeaders( DavServletResponse response, DavResourceLocator locator, DavResource resource )
+ private void setHeaders( DavServletResponse response, DavResourceLocator locator, DavResource resource,
+ boolean group )
{
// [MRM-503] - Metadata file need Pragma:no-cache response
// header.
response.setHeader( "Cache-Control", "no-cache" );
response.setDateHeader( "Last-Modified", new Date().getTime() );
}
+ else if ( group )
+ {
+ if ( resource instanceof ArchivaVirtualDavResource )
+ {
+ //MRM-1854 here we have a directory so force "Last-Modified"
+ response.setDateHeader( "Last-Modified", new Date().getTime() );
+ }
+ }
else
{
// We need to specify this so connecting wagons can work correctly