Do not use the 'Accept' header on PUT to get 'format'.
authorAntony Chazapis <chazapis@gmail.com>
Wed, 6 Jul 2011 08:25:18 +0000 (11:25 +0300)
committerAntony Chazapis <chazapis@gmail.com>
Wed, 6 Jul 2011 08:25:18 +0000 (11:25 +0300)
pithos/api/functions.py

index 459d54d..85f6ccf 100644 (file)
@@ -590,6 +590,10 @@ def object_write(request, v_account, v_container, v_object):
     #                       itemNotFound (404),
     #                       unauthorized (401),
     #                       badRequest (400)
+    
+    if not request.GET.get('format'):
+        request.serialization = 'text'
+    
     copy_from = request.META.get('HTTP_X_COPY_FROM')
     move_from = request.META.get('HTTP_X_MOVE_FROM')
     if copy_from or move_from: