ninja icon indicating copy to clipboard operation
ninja copied to clipboard

Doctester doesn't use utf-8 for formParams

Open davidgiga1993 opened this issue 5 years ago • 0 comments

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.

davidgiga1993 avatar Jun 12 '20 08:06 davidgiga1993