summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-06-25 16:27:46 +1000
committerOlivier Lamy <olamy@apache.org>2014-06-25 16:27:46 +1000
commit7cc7854a2671ef1476fc742fafb233f00836c46a (patch)
treeb77b51ad7d3ec6228c8d6317dbe3cf9280ea0af3
parent48a42e895ad413c5cf9e08382368d58661b20110 (diff)
downloadarchiva-7cc7854a2671ef1476fc742fafb233f00836c46a.tar.gz
archiva-7cc7854a2671ef1476fc742fafb233f00836c46a.zip
revert previous commit as 2.x was not affected in fact
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResource.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResource.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResource.java
index 2257467b4..559f160d8 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResource.java
+++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResource.java
@@ -212,8 +212,7 @@ public class ArchivaDavResource
{
if ( !isCollection() )
{
- //outputContext.setContentLength( localResource.length() );
- outputContext.setProperty( DavConstants.HEADER_CONTENT_LENGTH, Long.toString( localResource.length() ) );
+ outputContext.setContentLength( localResource.length() );
outputContext.setContentType( mimeTypes.getMimeType( localResource.getName() ) );
}
@@ -331,8 +330,7 @@ public class ArchivaDavResource
}
// TODO: a bad deployment shouldn't delete an existing file - do we need to write to a temporary location first?
- //long expectedContentLength = inputContext.getContentLength();
- long expectedContentLength = Long.parseLong( inputContext.getProperty( DavConstants.HEADER_CONTENT_LENGTH ) );
+ long expectedContentLength = inputContext.getContentLength();
long actualContentLength = localFile.length();
// length of -1 is given for a chunked request or unknown length, in which case we accept what was uploaded
if ( expectedContentLength >= 0 && expectedContentLength != actualContentLength )