The problem is not the Python client per se, but that Riak will always overwrite this field when you store the object. Although that property is necessarily writeable from within the client, it has no meaning when storing the object.
On Fri, Mar 14, 2014 at 3:38 PM, Jeff Peck <je...@tnrglobal.com> wrote: > Using the python client, it is possible to set an object's "Last-Modified" > date with obj.last_modified. However, I cannot figure out how to do it via > curl. I have looked carefully through the riak client source code, but did > not find anywhere where the Last-Modified header is even passed. > > Here is a simple example to show what I mean. Note the Last-Modified > header being passed: > > $ curl -XPUT http://localhost:8098/riak/wcc_dev/test_key -H > 'Content-Type: text/plain' -H 'Last-Modified: Tue, 19 Feb 2013 04:20:28 > GMT' -d test > > And now check out the Last-Modified header in the response: > > $ curl -vs http://localhost:8098/riak/wcc_dev/test_key; echo > * About to connect() to localhost port 8098 > * Trying 127.0.0.1... connected > * Connected to localhost (127.0.0.1) port 8098 > > GET /riak/wcc_dev/test_key HTTP/1.1 > > User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 > OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 > > Host: localhost:8098 > > Accept: */* > > > < HTTP/1.1 200 OK > < X-Riak-Vclock: a85hYGBgzGDKBVIclrxzrgWJzlqSwZTInMfK8OTx9DN8WQA= > < Vary: Accept-Encoding > < Server: MochiWeb/1.1 WebMachine/1.10.0 (never breaks eye contact) > < Link: </riak/wcc_dev>; rel="up" > < Last-Modified: Fri, 14 Mar 2014 20:34:44 GMT > < ETag: "3CegcRlc8Is7WtXxosnOEW" > < Date: Fri, 14 Mar 2014 20:36:13 GMT > < Content-Type: text/plain > < Content-Length: 4 > Connection #0 to host localhost left intact > * Closing connection #0 > test > > I have tried passing it as "Date" too, to no avail. > > It must be possible, because the Python API seems to be able to do it, > right? > > Thanks for any help with this. > > - Jeff > _______________________________________________ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > -- Sean Cribbs <s...@basho.com> Software Engineer Basho Technologies, Inc. http://basho.com/
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com