I am sending GET requests from Postman to Nginx server which is gateway for my backend app.
My requests can contain filter
query parameter which is an array of objects:
[{"property":"text_prop","operator":"ilike","value":"dep"}]
In the Nginx server’s logs I can see that it receives this filter
as:
[{%22property%22:%22text_prop%22,%22operator%22:%22ilike%22,%22value%22:%22dep%22}]
where double quotes has been encoded according to Percent encoding rules.
Next, I add %
sing to value
: [{"property":"text_prop","operator":"ilike","value":"dep%"}]
. At Nginx logs that construction received as: [{%22property%22:%22text_prop%22,%22operator%22:%22ilike%22,%22value%22:%22dep%%22}]
– that extra percen sign has not been encoded to %25
and has been send in a raw form.
Why is the percent sign not encoded automatically – I tried sending requests from Postman and from the Chrome browser? Perhaps somewhere there is a condition that the percent sign is not automatically encoded and it ALWAYS needs to be encoded manually (% -> %25
) – but I did not find this in various descriptions of the Percent encoding standard?
All other characters are encoded automatically in my case, with the only exception being the percent sign.