You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by rg...@apache.org on 2009/11/08 06:37:11 UTC

svn commit: r833831 - in /commons/proper/vfs/trunk: core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java xdocs/changes.xml

Author: rgoers
Date: Sun Nov  8 05:37:10 2009
New Revision: 833831

URL: http://svn.apache.org/viewvc?rev=833831&view=rev
Log:
Apply patch for VFS-261

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
    commons/proper/vfs/trunk/xdocs/changes.xml

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java?rev=833831&r1=833830&r2=833831&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java Sun Nov  8 05:37:10 2009
@@ -21,7 +21,7 @@
 import org.apache.commons.httpclient.HttpMethod;
 import org.apache.commons.httpclient.URIException;
 import org.apache.commons.httpclient.methods.RequestEntity;
-import org.apache.commons.httpclient.methods.StringRequestEntity;
+import org.apache.commons.httpclient.methods.ByteArrayRequestEntity;
 import org.apache.commons.httpclient.util.DateUtil;
 import org.apache.commons.vfs.provider.URLFileName;
 import org.apache.commons.vfs.provider.DefaultFileContent;
@@ -566,7 +566,7 @@
          */
         protected void onClose() throws IOException
         {
-            RequestEntity entity = new StringRequestEntity(out.toString());
+            RequestEntity entity = new ByteArrayRequestEntity(((ByteArrayOutputStream) out).toByteArray());
             URLFileName fileName = (URLFileName) getName();
             String urlStr = urlString(fileName);
             if (builder.isVersioning(getFileSystem().getFileSystemOptions()))

Modified: commons/proper/vfs/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/xdocs/changes.xml?rev=833831&r1=833830&r2=833831&view=diff
==============================================================================
--- commons/proper/vfs/trunk/xdocs/changes.xml (original)
+++ commons/proper/vfs/trunk/xdocs/changes.xml Sun Nov  8 05:37:10 2009
@@ -23,6 +23,9 @@
 
   <body>
     <release version="2.0" date="in SVN" description="">
+      <action dev="rgoers" type="fix" issue="VFS-261" due-to="Simon Olofsson">
+        WebDAV upload corrupts binary files
+      </action>
       <action dev="rgoers" type="fix" issue="VFS-276" due-to="Vince Bonfanti">
         add ProviderTestConfig.getDefaultFileSystemManager() method
       </action>