Revision 1495b972 docs/source/devguide.rst

b/docs/source/devguide.rst
25 25
=========================  ================================
26 26
Revision                   Description
27 27
=========================  ================================
28
0.5 (July 11, 2011)        Object update from another object's data.
28
0.5 (July 12, 2011)        Object update from another object's data.
29
\                          Support object truncate.
29 30
0.4 (July 01, 2011)        Object permissions and account groups.
30 31
\                          Control versioning behavior and container quotas with container policy directives.
31 32
\                          Support updating/deleting individual metadata with ``POST``.
......
679 680
Content-Disposition   The presentation style of the object (optional)
680 681
X-Source-Object       Update with data from the object at path ``/<container>/<object>`` (optional, to update)
681 682
X-Source-Version      The source version to update from (optional, to update)
683
X-Object-Bytes        The updated object's final size (optional, when updating)
682 684
X-Object-Manifest     Object parts prefix in ``<container>/<object>`` form (optional)
683 685
X-Object-Sharing      Object permissions (optional)
684 686
X-Object-Public       Object is publicly accessible (optional)
......
699 701
  * Client software SHOULD not specify the ``instance-length`` (use a ``*``), unless there is a reason for performing a size check at the server.
700 702
* If ``Content-Range`` used has a ``byte-range-resp-spec = *``, data will be appended to the object.
701 703

  
704
Optionally, truncate the updated object to the desired length with the ``X-Object-Bytes`` header.
705

  
702 706
A data update will trigger an ETag change. The new ETag will not correspond to the object's MD5 sum (**TBD**) and will be included in reply headers.
703 707

  
704 708
No reply content. No reply headers if only metadata is updated.
......
770 774
* Object metadata allowed, in addition to ``X-Object-Meta-*``: ``Content-Encoding``, ``Content-Disposition``, ``X-Object-Manifest``. These are all replaced with every update operation, except if using the ``update`` parameter (in which case individual keys can also be deleted). Deleting meta by providing empty values also works when copying/moving an object.
771 775
* Multi-range object GET support as outlined in RFC2616.
772 776
* Object hashmap retrieval through GET and the ``format`` parameter.
773
* Partial object updates through POST, using the ``Content-Length``, ``Content-Type``, ``Content-Range`` and ``Transfer-Encoding`` headers. Use another object's data to update with ``X-Source-Object`` and ``X-Source-Version``.
777
* Partial object updates through POST, using the ``Content-Length``, ``Content-Type``, ``Content-Range`` and ``Transfer-Encoding`` headers. Use another object's data to update with ``X-Source-Object`` and ``X-Source-Version``. Truncate with ``X-Object-Bytes``.
774 778
* Object ``MOVE`` support.
775 779
* Time-variant account/container listings via the ``until`` parameter.
776 780
* Object versions - parameter ``version`` in HEAD/GET (list versions with GET), ``X-Object-Version-*`` meta in replies, ``X-Source-Version`` in PUT/COPY.
......
945 949
         -d "0123456789" \
946 950
         https://pithos.dev.grnet.gr/v1/user/folder/EXAMPLE.txt
947 951

  
952
* Update an object (truncate) ::
953

  
954
    curl -X POST -D - \
955
         -H "X-Auth-Token: 0000" \
956
         -H "X-Source-Object: /folder/EXAMPLE.txt" \
957
         -H "Content-Range: bytes 0-0/*" \
958
         -H "X-Object-Bytes: 0" \
959
         https://pithos.dev.grnet.gr/v1/user/folder/EXAMPLE.txt
960

  
961
  This will truncate the object to 0 bytes.
962

  
948 963
* Add object metadata ::
949 964

  
950 965
    curl -X POST -D - \

Also available in: Unified diff