-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Milestone
Description
Expected behavior
HTTP Request Sampler should allow upload of files which name contains special characters, without changing the files name.
Actual behavior
In HTTP Request Sampler, when uploading a file which name contains special characters (for example: éèà), the characters are replaced by "?" in HTTP Request:
Content-Disposition: form-data; name="file1"; filename="nameWithSpecialCharacters_??.txt" Content-Type: text/plain Content-Transfer-Encoding: binary
This is when we use HttpClient4 implementation. With java implementation, they are replaced by "�" (REPLACEMENT CHARACTER).
Note that setting file.encoding system property to UTF-8 doesn't affect the behavior.
Steps to reproduce the problem
- Add HTTP Request in TestPlan.
- Select the POST method.
- Type in the Path.
- Select use multipart/form-data.
- Under the File Upload tab, enter the file path, Parameter Name, and MimeType. MIME Type examples: image/jpeg, image/png, text/plain. Choose a file which name contains special characters (for example: éèà)
- Save and run the test.
- In View Results Tree, Request Body, check that special characters are replaced by "?" or "�".
JMeter Version
5.5
Java Version
java version "11.0.13" 2021-10-19 LTS
OS Version
Microsoft Windows [Version 10.0.19044.2364]
Reactions are currently unavailable