Bug 56706

Summary: SampleResult#getResponseDataAsString() does not use encoding in response body impacting PostProcessors and ViewResultsTree
Product: JMeter Reporter: Ori <ori.fux>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal CC: p.mouawad
Priority: P2    
Version: 2.11   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Http test
Test results with JMeterProperties (ver 2.8)
Test results with JMeterProperties (ver 2.11)
Fix for Bug

Description Ori 2014-07-09 21:52:03 UTC
Created attachment 31803 [details]
Http test

An http test running in version 2.11, display Hebrew characters as Gibberish in the "View results tree" screen.

The same test running in version 2.8 display a well Hebrew characters.
Comment 1 Ori 2014-07-09 21:55:17 UTC
Created attachment 31804 [details]
Test results with JMeterProperties (ver 2.8)
Comment 2 Ori 2014-07-09 21:56:15 UTC
Created attachment 31805 [details]
Test results with JMeterProperties (ver 2.11)
Comment 3 UbikLoadPack support 2014-07-12 12:36:59 UTC
Created attachment 31811 [details]
Fix for Bug

Hello,
Please find attached the patch that fixes the bug.
After analysis, the issue is due to PostProcessor in Test Plan.
We noticed that if you remove them from first sampler, characters will not be corrupted but if you add them they will.
After further analysis , it appeared that as SampleResult#getDataEncodingWithDefault was not overriden in HTTPSampleResult, it lead to encoding contained in html code not being used to decode response.

As we signed an CCLA code is fully property of Apache and we release any right on it.

Regards
Ubik Load Pack
http://ubikloadpack.com
@ubikloadpack
Comment 4 Philippe Mouawad 2014-07-12 12:58:16 UTC
Thanks for contribution, applied with addition of javadocs.


Date: Sat Jul 12 12:57:07 2014
New Revision: 1609912

URL: http://svn.apache.org/r1609912
Log:
Bug 56706 - SampleResult#getResponseDataAsString() does not use encoding in response body impacting PostProcessors and ViewResultsTree
Bugzilla Id: 56706

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
    jmeter/trunk/xdocs/changes.xml