Document django's behavior when using the internal web server and not supplying a...
authorAntony Chazapis <chazapis@gmail.com>
Fri, 16 Dec 2011 13:53:24 +0000 (15:53 +0200)
committerAntony Chazapis <chazapis@gmail.com>
Fri, 16 Dec 2011 13:53:24 +0000 (15:53 +0200)
Fixes #1734

docs/source/devguide.rst
pithos/api/functions.py

index 0f38015..1fd15ae 100644 (file)
@@ -25,10 +25,11 @@ Document Revisions
 =========================  ================================
 Revision                   Description
 =========================  ================================
-0.8 (Dec 15, 2011)         Update allowed versioning values.
+0.8 (Dec 16, 2011)         Update allowed versioning values.
 \                          Change policy/meta formatting in JSON/XML replies.
 \                          Document that all non-ASCII characters in headers should be URL-encoded.
 \                          Support metadata-based queries when listing objects at the container level.
+\                          Note Content-Type issue when using the internal django web server.
 0.7 (Nov 21, 2011)         Suggest upload/download methods using hashmaps.
 \                          Propose syncing algorithm.
 \                          Support cross-account object copy and move.
@@ -866,7 +867,7 @@ If-Match              Proceed if ETags match with object
 If-None-Match         Proceed if ETags don't match with object
 Destination           The destination path in the form ``/<container>/<object>``
 Destination-Account   The destination account to copy to
-Content-Type          The MIME content type of the object (optional)
+Content-Type          The MIME content type of the object (optional :sup:`*`)
 Content-Encoding      The encoding of the object (optional)
 Content-Disposition   The presentation style of the object (optional)
 X-Source-Version      The source version to copy from
@@ -876,6 +877,8 @@ X-Object-Public       Object is publicly accessible (optional)
 X-Object-Meta-*       Optional user defined metadata
 ====================  ================================
 
+:sup:`*` *When using django locally with the supplied web server, do provide a valid Content-Type, as a type of text/plain is applied by default to all requests.*
+
 Refer to ``PUT``/``POST`` for a description of request headers. Metadata is also copied, updated with any values defined. Sharing/publishing options are not copied.
 
 ==========================  ===============================
index 5dfe307..75a2108 100644 (file)
@@ -990,6 +990,7 @@ def object_update(request, v_account, v_container, v_object):
     #                       itemNotFound (404),
     #                       forbidden (403),
     #                       badRequest (400)
+    
     meta, permissions, public = get_object_headers(request)
     content_type = meta.get('Content-Type')
     if content_type: