Bug 61669

Summary: HTTP sampler corrupts file with Chinese characters when upload file with http sampler (NEED REPRODUCER CASE to confirm)
Product: JMeter - Now in Github Reporter: Nick.Yin <287495160>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: NEEDINFO ---    
Severity: major CC: 13811246972, bin, jonas.jasas, p.mouawad
Priority: P3    
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: filename with chinese charactor
filename with English
http-request of jmeter3.2
result of jmeter3.2
http-request of jmeter3.3
result of jmeter3.3

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. ***
Comment 12 The ASF infrastructure team 2022-09-24 20:38:10 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4546