You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2012/07/23 00:02:36 UTC

svn commit: r1364445 - in /libcloud/trunk: CHANGES libcloud/storage/base.py

Author: tomaz
Date: Sun Jul 22 22:02:36 2012
New Revision: 1364445

URL: http://svn.apache.org/viewvc?rev=1364445&view=rev
Log:
Fix a bug with uploading zero-sized files in the OpenStack Swift /
CloudFiles driver.

Modified:
    libcloud/trunk/CHANGES
    libcloud/trunk/libcloud/storage/base.py

Modified: libcloud/trunk/CHANGES
URL: http://svn.apache.org/viewvc/libcloud/trunk/CHANGES?rev=1364445&r1=1364444&r2=1364445&view=diff
==============================================================================
--- libcloud/trunk/CHANGES (original)
+++ libcloud/trunk/CHANGES Sun Jul 22 22:02:36 2012
@@ -131,6 +131,10 @@ Changes with Apache Libcloud in developm
     - Fix upload_object_via_stream method in the Atmos driver. ; LIBCLOUD-228
       [Benno Rice]
 
+    - Fix a bug with uploading zero-sized files in the OpenStack Swift /
+      CloudFiles driver.
+      [Tomaz Muraus]
+
   *) Other:
 
     - Unify docstrings formatting in the compute drivers. ; LIBCLOUD-229

Modified: libcloud/trunk/libcloud/storage/base.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/storage/base.py?rev=1364445&r1=1364444&r2=1364445&view=diff
==============================================================================
--- libcloud/trunk/libcloud/storage/base.py (original)
+++ libcloud/trunk/libcloud/storage/base.py Sun Jul 22 22:02:36 2012
@@ -547,7 +547,7 @@ class StorageDriver(BaseDriver):
             file_size = os.path.getsize(file_path)
             upload_func_kwargs['chunked'] = False
 
-        if file_size:
+        if file_size is not None:
             headers['Content-Length'] = file_size
 
         headers['Content-Type'] = content_type