Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a metadata entry for content-type

  • Loading branch information...
commit 147760ea5440404c8c969c0f9bb7faba1d771adb 1 parent 31e6084
@russelldb russelldb authored
View
1  src/riak_kv_counter.erl
@@ -111,7 +111,6 @@ update_object(RObj, Meta, Counter, SiblingValues) ->
%% keep non-counter siblings, too
riak_object:set_contents(RObj, [{counter_meta(Meta), {riak_kv_pncounter, Counter}} | SiblingValues]).
-
counter_meta(undefined) ->
Now = os:timestamp(),
M = dict:new(),
View
3  src/riak_kv_pb_counter.erl
@@ -41,6 +41,7 @@
-include_lib("riak_pb/include/riak_kv_pb.hrl").
-include_lib("riak_pb/include/riak_pb_kv_codec.hrl").
+-include_lib("riak_kv_types.hrl").
-behaviour(riak_api_pb_service).
@@ -95,7 +96,7 @@ process(#rpbcounterupdatereq{bucket=B, key=K, w=W0, dw=DW0, pw=PW0, amount=Coun
#state{client=C} = State) ->
case allow_mult(B) of
true ->
- O0 = riak_object:new(B, K, ?NEW_COUNTER),
+ O0 = riak_object:new(B, K, ?NEW_COUNTER, ?COUNTER_TYPE),
O = riak_object:set_vclock(O0, vclock:fresh()),
%% erlang_protobuffs encodes as 1/0/undefined
W = decode_quorum(W0),
View
3  src/riak_kv_wm_counter.erl
@@ -66,6 +66,7 @@
-include_lib("webmachine/include/webmachine.hrl").
-include("riak_kv_wm_raw.hrl").
+-include_lib("riak_kv_types.hrl").
%% @spec init(proplist()) -> {ok, context()}
%% @doc Initialize this resource. This function extracts the
@@ -210,7 +211,7 @@ accept_doc_body(RD, Ctx=#ctx{bucket=B, key=K, client=C,
counter_op=CounterOp}) ->
case allow_mult(B) of
true ->
- Doc0 = riak_object:new(B, K, ?NEW_COUNTER),
+ Doc0 = riak_object:new(B, K, ?NEW_COUNTER, ?COUNTER_TYPE),
VclockDoc = riak_object:set_vclock(Doc0, vclock:fresh()),
Options = [{counter_op, CounterOp}],
case C:put(VclockDoc, [{w, Ctx#ctx.w}, {dw, Ctx#ctx.dw}, {pw, Ctx#ctx.pw}, {timeout, 60000} |
View
2  src/riak_kv_wm_raw.hrl
@@ -53,8 +53,6 @@
-define(JSON_EXTRACT, <<"search_extractor">>).
-define(JSON_EXTRACT_LEGACY, <<"rs_extractfun">>).
-
-
%% Names of HTTP query parameters
-define(Q_PROPS, "props").
-define(Q_BUCKETS, "buckets").
Please sign in to comment.
Something went wrong with that request. Please try again.