Skip to content

Commit

Permalink
Disable urldecode for JSON-RPC
Browse files Browse the repository at this point in the history
None of the popular JSON-RPC clients apply urlencode to the produced JSON
request. Consequently, any method parameter that contains percent symbol will be
either decoded to a wrong value or, more often, will cause request handling
failure.
  • Loading branch information
Vladislav Glinsky authored and vinoski committed Feb 27, 2022
1 parent 22b9a77 commit 842ff1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/yaws_rpc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ handle_payload(Args, Handler, Type) ->
PL = unicode:characters_to_list(Args#arg.clidata),
{Payload,DecodedStr} =
case RpcType of
T when T==haxe; T==json ->
T when T==haxe ->
?Debug("rpc ~p call ~p~n", [T, PL]),
{PL, yaws_api:url_decode(PL)};
soap_dime ->
Expand Down

0 comments on commit 842ff1c

Please sign in to comment.