ninja
ninja copied to clipboard
Doctester doesn't use utf-8 for formParams
Issue
When using the NinjaDocTester with .formParameters() the payload is not encoded as utf-8.
The root cause is in TestBrowserImpl:161:
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formparams);
The constructor is not called with any encoding.
Solution
The encoding should be added
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formparams, StandardCharsets.UTF_8);
I've added this issue here since it seems that the DocTester repo is inactive for the last 3 years. So maybe we can find a solution in Ninja for this issue.