Bug 61669 - HTTP sampler corrupts file with Chinese characters when upload file with http sampler (NEED REPRODUCER CASE to confirm)
Summary: HTTP sampler corrupts file with Chinese characters when upload file with http...
Status: NEEDINFO
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 3.3
Hardware: PC All
: P3 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
: 62116 63686 65275 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-10-26 07:07 UTC by Nick.Yin
Modified: 2021-05-08 11:08 UTC (History)
4 users (show)



Attachments
filename with chinese charactor (26.96 KB, image/png)
2017-10-26 07:07 UTC, Nick.Yin
Details
filename with English (25.77 KB, image/png)
2017-10-26 07:08 UTC, Nick.Yin
Details
http-request of jmeter3.2 (95.60 KB, image/png)
2017-11-04 13:07 UTC, Nick.Yin
Details
result of jmeter3.2 (121.31 KB, image/png)
2017-11-04 13:08 UTC, Nick.Yin
Details
http-request of jmeter3.3 (86.49 KB, image/png)
2017-11-04 13:08 UTC, Nick.Yin
Details
result of jmeter3.3 (101.75 KB, image/png)
2017-11-04 13:09 UTC, Nick.Yin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick.Yin 2017-10-26 07:07:02 UTC
Created attachment 35463 [details]
filename with chinese charactor

precondition:
use multipart/form-data for Post and Browser-compatible headers is chosen.

step:
1.add a HTTP sample to threadgroup
2.choose a file with Chinese character in file upload area in sampler
3. excute the test

excepted result:
the file whose file name is Chinese character is displayed in view result tree

actual:
the file name displays like ?????

by the way: it was working fine with Jmeter 3.1
Comment 1 Nick.Yin 2017-10-26 07:08:37 UTC
Created attachment 35464 [details]
filename with English
Comment 2 Philippe Mouawad 2017-11-02 23:28:49 UTC
See:

- https://stackoverflow.com/questions/20591599/why-arent-post-names-with-unicode-sent-correctly-when-using-multipart-form-data/20592910#20592910


RFC 2388 4.4 applies here and the filenames can be encoded using RFC 2231.

See discussion around Bug 61384
Comment 3 Nick.Yin 2017-11-04 13:07:19 UTC
Created attachment 35482 [details]
http-request of jmeter3.2
Comment 4 Nick.Yin 2017-11-04 13:08:09 UTC
Created attachment 35483 [details]
result of jmeter3.2
Comment 5 Nick.Yin 2017-11-04 13:08:57 UTC
Created attachment 35484 [details]
http-request of jmeter3.3
Comment 6 Nick.Yin 2017-11-04 13:09:26 UTC
Created attachment 35485 [details]
result of jmeter3.3
Comment 7 Nick.Yin 2017-11-04 13:14:06 UTC
I tried with Jmeter 3.2 compared to Jmeter 3.3, and found it's working fine with Jmeter 3.2. See the attachment.
and I reviewed the release note of Jmeter3.3 , I'm still thinking it's a bug.(In reply to Philippe Mouawad from comment #2)
> See:
> 
> -
> https://stackoverflow.com/questions/20591599/why-arent-post-names-with-
> unicode-sent-correctly-when-using-multipart-form-data/20592910#20592910
> 
> 
> RFC 2388 4.4 applies here and the filenames can be encoded using RFC 2231.
> 
> See discussion around Bug 61384
Comment 8 Philippe Mouawad 2017-11-04 14:09:56 UTC
Hello,
It's not a regression although you might think so.

JMeter 3.2 was wrong in working the way it was.
The change is due to Bug 61384.

See :
- http://httpcomponents.10934.n7.nabble.com/Charset-restriction-on-parameter-names-td31380.html
- https://issues.apache.org/jira/browse/HTTPCLIENT-293
- Discussion with title:
svn commit: r1806215 - in /jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java xdocs/changes.xml

Also have a look at TEST_HTTP.jmx you'll see that tests consider this.

If you think I am wrong in my analysis, can you point me to the RFC that contradicts JMeter behaviour ?

Thank you
Comment 9 Philippe Mouawad 2018-02-22 20:13:26 UTC
*** Bug 62116 has been marked as a duplicate of this bug. ***
Comment 10 Philippe Mouawad 2019-12-27 11:55:48 UTC
*** Bug 63686 has been marked as a duplicate of this bug. ***
Comment 11 Felix Schumacher 2021-05-08 11:08:52 UTC
*** Bug 65275 has been marked as a duplicate of this bug. ***