Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webmachine error on GET for siblings #53

Open
dmitrizagidulin opened this issue Jun 26, 2015 · 0 comments
Open

Webmachine error on GET for siblings #53

dmitrizagidulin opened this issue Jun 26, 2015 · 0 comments

Comments

@dmitrizagidulin
Copy link
Contributor

Issuing a get to an object with two (binary blob) siblings results in error:

catch rhc:get(rhc:create("127.0.0.1", 8098, "riak", []), <<"user_data_cache">>,list_to_binary(integer_to_list(447431762613))).
{'EXIT',{{badmatch,[<<"\r\n">>]},
         [{webmachine_multipart,make_part,1,
                                [{file,"src/webmachine_multipart.erl"},
                                 {line,102}]},
          {webmachine_multipart,stream_form,3,
                                [{file,"src/webmachine_multipart.erl"},
                                 {line,77}]},
          {webmachine_multipart,get_all_parts,2,
                                [{file,"src/webmachine_multipart.erl"},
                                 {line,58}]},
          {rhc_obj,decode_siblings,2,
                   [{file,"src/rhc_obj.erl"},{line,79}]},
          {rhc_obj,make_riakc_obj,4,
                   [{file,"src/rhc_obj.erl"},{line,43}]},
          {rhc,get,4,[{file,"src/rhc.erl"},{line,178}]},
          {erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,576}]},
          {erl_eval,expr,5,[{file,"erl_eval.erl"},{line,360}]}]}}

To reproduce:

RO2 = riakc_obj:new(<<"BUCKET">>, <<"KEY2">>, <<"SomeData">>).
RO3 = riakc_obj:new(<<"BUCKET">>, <<"KEY2">>, <<"SomeMoreData">>).

rhc:put(rhc:create("127.0.0.1", 8098, "riak", []), RO2).
rhc:put(rhc:create("127.0.0.1", 8098, "riak", []), RO3).
rhc:get(rhc:create("127.0.0.1", 8098, "riak", []), <<"BUCKET">>, <<"KEY2">>).

For reference, here's what the object for the error above looks like, via curl:

curl localhost:8098/riak/user_data_cache/447431762613 -H "accept:multipart/mixed" -v
* About to connect() to localhost port 8098 (#0)
*   Trying ::1...
* Connection refused
*   Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 8098 (#0)
> GET /riak/user_data_cache/447431762613 HTTP/1.1
> User-Agent: curl/7.26.0
> Host: localhost:8098
> accept:multipart/mixed
>
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 300 Multiple Choices
< X-Riak-Vclock: a85hYGBgzGDKBVIc7N//6Yf2yq3OYEpkymNlKFvIeJ4vCwA=
< Vary: Accept, Accept-Encoding
< Server: MochiWeb/1.1 WebMachine/1.10.0 (never breaks eye contact)
< Last-Modified: Fri, 26 Jun 2015 10:12:06 GMT
< ETag: "1YIAAqwL3zHEo8ze8qb1tc"
< Date: Fri, 26 Jun 2015 10:59:34 GMT
< Content-Type: multipart/mixed; boundary=Qh1ip4nObAMmn9KcnHGVjhKgNBG
< Content-Length: 759
<

--Qh1ip4nObAMmn9KcnHGVjhKgNBG
Content-Type: application/octet-stream
Link: </riak/user_data_cache>; rel="up"
Etag: 7IrjozbcMxYAjy6v7FWvv5
Last-Modified: Fri, 26 Jun 2015 10:12:05 GMT�h
  d
share_datab1h�n��-hhn���jjjn���jd       undefinedd      undefinedd      undefined
--Qh1ip4nObAMmn9KcnHGVjhKgNBG
Content-Type: application/octet-stream
Link: </riak/user_data_cache>; rel="up"
Etag: Z7IKoboZTrL5CYzTo2XqC
Last-Modified: Fri, 26 Jun 2015 10:12:06 GMT
�h
  d
share_datab1h�n��-hhn���jlhh
                            d
AFUP_100MB_HSd  undefinedk
                          63602536325dvirtualk2hhb�aa
                                                     haaahhb�aa
                                                               haaa$d   undefinedn��-hn��-hHS_100MBn���jjn���jd undefinedd      undefinedd      undefined
--Qh1ip4nObAMmn9KcnHGVjhKgNBG--
* Connection #0 to host localhost left intact
* Closing connection #0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant