capacitor icon indicating copy to clipboard operation
capacitor copied to clipboard

fix(http): fix encoding issue in multipart/form-data requests

Open rezendeneto opened this issue 1 year ago • 3 comments

This PR addresses the issue of handling special characters in FormData requests (e.g. ü, ö, and ä). To provide a clearer understanding of the changes, I've prepared a code snippet, which you can view here: tutorialspoint snippet

rezendeneto avatar Jan 26 '24 22:01 rezendeneto

Hello! Can we please get a review on this PR?

This PR contains a minor code change that fixes the issue where a FormData can't be submitted with "special" characters like ö, ü and ä.

rezendeneto avatar Feb 23 '24 00:02 rezendeneto

Does this also resolve the issue if the file name contains any of these special characters?

JosefBredereck avatar Apr 11 '24 12:04 JosefBredereck

@JosefBredereck good point! Since we know that os.writeBytes does not handle well special characters, I would assume that, if they appear in any of these calls, they wouldn't be encoded correctly:

image

rezendeneto avatar Apr 12 '24 12:04 rezendeneto

looks like the same PR https://github.com/ionic-team/capacitor/pull/6730

5uper avatar May 15 '24 15:05 5uper