Hi Greg,

Good catch, this appears to be a bug that affects 0.14.*. It only happens
when you rely on the server to generate an object's key. If you provide the
key yourself, then the content type header acts as expected.

This is actually already fixed in the master branch, and the fix will be
included in the next release of Riak. (Just a few weeks away!)

I've filed a ticket for it here:
https://issues.basho.com/show_bug.cgi?id=1182

Best,
Rusty


On Sun, Sep 11, 2011 at 1:39 AM, Greg Stein <gst...@gmail.com> wrote:

> Hey all,
>
> I just ran into a questionable situation. On the following doc page:
>  http://wiki.basho.com/HTTP-Store-Object.html
>
> It says:
>
> "
> Important headers:
> Content-Type must be set for the stored object. Set what you expect to
> receive back when next requesting it.
> "
>
> So I ran the following test via telnet against a 0.14.0 server. Note
> the Content-Length is 5 given invisible characters: "def\r\n".
>
> ----
> $ telnet 127.0.0.1 8098
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> POST /riak/test?returnbody=true HTTP/1.0
> Content-Length: 5
> Content-Type: application/octet-stream
>
> def
> HTTP/1.0 201 Created
> X-Riak-Vclock: a85hYGBgzGDKBVIsbI0n/DOYEhnzWBmKDz84zpcFAA==
> Vary: Accept-Encoding
> Server: MochiWeb/1.1 WebMachine/1.7.3 (participate in the frantic)
> Location: /riak/test/F9uE8Heo6v0wtXY2rMKOktQbPGH
> Link: </riak/test>; rel="up"
> Date: Sun, 11 Sep 2011 05:30:27 GMT
> Content-Type: application/json
> Content-Length: 5
>
> def
> Connection closed by foreign host.
> ----
>
> My question is why the response says application/json when I gave the
> server application/octet-stream. Did I miss some RTFM documentation?
>
> Thanks,
> -g
>
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to