Skip to content

Commit

Permalink
fix(android): UTF-8 encode form data value (#7531)
Browse files Browse the repository at this point in the history
Co-authored-by: Malo <55086681+malo-malo@users.noreply.github.com>
Co-authored-by: Malo <malo.c@hellowatt.fr>
  • Loading branch information
3 people authored Jun 24, 2024
1 parent 7cdb7c7 commit 6aaffbc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ private void writeFormDataRequestBody(String contentType, JSArray entries) throw
if (type.equals("string")) {
os.writeBytes(twoHyphens + boundary + lineEnd);
os.writeBytes("Content-Disposition: form-data; name=\"" + key + "\"" + lineEnd + lineEnd);
os.writeBytes(value);
os.write(value.getBytes(StandardCharsets.UTF_8));
os.writeBytes(lineEnd);
} else if (type.equals("base64File")) {
String fileName = entry.getString("fileName");
Expand Down

0 comments on commit 6aaffbc

Please sign in to comment.