anchor.diff:              end
       end.
   
  +parse_json(Req) ->
  +    mochijson2:decode(Req:recv_body()).
  +
  +parse_boolean(Value) ->
  +    case Value of
  +        true -> true;
  +        false -> false;
  +        <<"true">> -> true;
  +        <<"false">> -> false;
  +        <<"1">> -> true;
  +        <<"0">> -> false;
  +        1 -> true;
  +        0 -> false
  +    end.
  +
   handle_traffic_generator_control_post(Req) ->
       PostArgs = Req:parse_post(),
       case proplists:get_value("onOrOff", PostArgs) of
  
positive.code:     %   ]}
      % ]}
      %
      Params = Req:parse_qs(),
      case mc_bucket:bucket_config_get(mc_pool:pools_config_get(),
                                       PoolId, BucketId) of
          false -> Req:respond({400, [], []});
          BucketConfig ->
              Auth = case proplists:get_value(<<"password">>, Params) of
                         undefined -> undefined;
                         Password  -> {BucketId, binary_to_list(Password)}
                     end,
              BucketConfig2 =
  
negative.code:     ok.
  
  handle_bucket_update(PoolId, BucketId, Req) ->
      % There are two ways one would get here, Req will contain a JSON
      % payload
      %
      % A PUT means create/update.  A PUT may be sparse as some things
      % (like memory amount) will fall back to server defaults
      %
      % A POST means modify existing bucket settings.  For 1.0, this will *only*
      % allow changing the password or setting the password to ""
      %
      % The JSON looks like...
      %
      % {"password": "somepassword",
      %  "size_per_node", "64",
      %  "preallocate", "0"}
      %
      % An empty password string ("") is the same as undefined auth_plain.
      %
      % TODO: after 1.0: allow password changes via urlencoded post
      %
  