Skip to content

Commit

Permalink
Fix bug of accept content type
Browse files Browse the repository at this point in the history
  • Loading branch information
shino committed Feb 12, 2014
1 parent d215335 commit 9f1d2cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions riak_test/src/rtcs.erl
Original file line number Diff line number Diff line change
Expand Up @@ -594,12 +594,12 @@ update_user(UserConfig, Port, Resource, ContentType, UpdateDoc) ->
lager:debug("Update user output=~p~n",[Output]),
Output.

list_users(UserConfig, Port, Resource, ContentType) ->
list_users(UserConfig, Port, Resource, AcceptContentType) ->
Date = httpd_util:rfc1123_date(),
Cmd="curl -s -H 'Date: " ++ Date ++
"' -H 'Content-Type: " ++ ContentType ++
"' -H 'Accept: " ++ AcceptContentType ++
"' -H 'Authorization: " ++
make_authorization("GET", Resource, ContentType, UserConfig, Date) ++
make_authorization("GET", Resource, "", UserConfig, Date) ++
"' http://localhost:" ++ integer_to_list(Port) ++
Resource,
Delay = rt_config:get(rt_retry_delay),
Expand Down
2 changes: 1 addition & 1 deletion riak_test/tests/user_test.erl
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ parse_user_records(Output, ?JSON) ->
KeySecret = binary_to_list(proplists:get_value(<<"key_secret">>, UserJson)),
Status = binary_to_list(proplists:get_value(<<"status">>, UserJson)),
{Email, Name, KeyId, KeySecret, Status}
end || UserJson <- JsonData];
end || {struct, UserJson} <- JsonData];
parse_user_records(Output, ?XML) ->
{ParsedData, _Rest} = xmerl_scan:string(Output, []),
[lists:foldl(fun user_fields_from_xml/2,
Expand Down

0 comments on commit 9f1d2cd

Please sign in to comment.