archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject git commit: revert previous commit as 2.x was not affected in fact
Date Wed, 25 Jun 2014 06:28:12 GMT
Repository: archiva
Updated Branches:
  refs/heads/master 48a42e895 -> 7cc7854a2


revert previous commit as 2.x was not affected in fact


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/7cc7854a
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/7cc7854a
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/7cc7854a

Branch: refs/heads/master
Commit: 7cc7854a2671ef1476fc742fafb233f00836c46a
Parents: 48a42e8
Author: Olivier Lamy <olamy@apache.org>
Authored: Wed Jun 25 16:27:46 2014 +1000
Committer: Olivier Lamy <olamy@apache.org>
Committed: Wed Jun 25 16:27:46 2014 +1000

----------------------------------------------------------------------
 .../java/org/apache/archiva/webdav/ArchivaDavResource.java     | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/7cc7854a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResource.java
----------------------------------------------------------------------
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 2257467..559f160 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
)


Mime
View raw message