From 5f1c83e57c049c0954945433766bcc9466d8fb91 Mon Sep 17 00:00:00 2001 From: Vladislav Glinsky Date: Mon, 21 Feb 2022 10:57:40 +0200 Subject: [PATCH] Disable urldecode for JSON-RPC 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. --- src/yaws_rpc.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yaws_rpc.erl b/src/yaws_rpc.erl index 835a45235..4ccea2f42 100644 --- a/src/yaws_rpc.erl +++ b/src/yaws_rpc.erl @@ -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 ->