From cc0ce2d70709a09bcfafcfbc3e4460f7266d697a Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Fri, 18 Apr 2008 06:30:31 +0000 Subject: [PATCH] [MRM-781] additional fixes to webdav Submitted by: James William Dumay git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@649382 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/maven/archiva/webdav/ArchivaDavResource.java | 2 ++ .../maven/archiva/webdav/ArchivaDavResourceFactory.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResource.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResource.java index 7d2d7f40d..6a3d51576 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResource.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResource.java @@ -133,6 +133,8 @@ public class ArchivaDavResource implements DavResource if (!isCollection()) { IOUtils.copy(new FileInputStream(localResource), outputContext.getOutputStream()); + outputContext.setContentLength(getContentLength()); + outputContext.setContentType(getContentType()); } else { diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java index f5016f187..82bd6e91f 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java @@ -269,7 +269,7 @@ public class ArchivaDavResourceFactory implements DavResourceFactory, Auditable } catch ( RepositoryMetadataException e ) { - log.error(e.getMessage(), e); + /* eat it */ } try @@ -283,7 +283,7 @@ public class ArchivaDavResourceFactory implements DavResourceFactory, Auditable } catch ( RepositoryMetadataException e ) { - log.error(e.getMessage(), e); + /* eat it */ } return false;