Summary: | JMeter can not identify encoding during first time page submission | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Naveen Nandwani <naveen.nandwani> |
Component: | HTTP | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | naveen.nandwani, p.mouawad |
Priority: | P1 | Keywords: | FixedInTrunk |
Version: | 5.0 | ||
Target Milestone: | JMETER_5.2 | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
Application to reproduce the scenario.
Test Plan to reproduce the issue. Proposed changes in Source Code. Will create separate PR request. |
Description
Naveen Nandwani
2019-01-29 17:10:40 UTC
Created attachment 36402 [details]
Test Plan to reproduce the issue.
Created attachment 36403 [details]
Proposed changes in Source Code. Will create separate PR request.
Solution:
First Request is GET to load the base url. JMeter stores the encoding of the page (Shift-JIS).
Second Request is POST to submit "Japanese Character", but encoding is not available, as page is traversed for first time. If encoding of page of first request (Shift-JIS) is used, then Japanese Character will be correctly stored.
Following is the code snippet:
contentEncoding = pageEncodings.get(urlWithoutQuery);
if(contentEncoding == null && pageEncodings.size()>0) {
contentEncoding = new ArrayList<String>(pageEncodings.values()).get(0);
}
Get Current page encoding is null, check the pageEncoding list, if last page encoding is available, use it.
I think it's a duplicate of 63130, if I am wrong please reopen. *** This bug has been marked as a duplicate of bug 63130 *** Scenario of this bug is similar to #63130, but root cause is different. In this bug, JMeter does not have the encoding for the first time page POST request. In case of #63130, encoding library is not working fine, in case of multi-byte Japanese character. Example of such character is mentioned in #63130. Please let me know, if more details are required. Hi, PR request is created for this bug, please refer below: https://github.com/apache/jmeter/pull/441 Please let me know, if more information is required. Regards, Author: pmouawad Date: Sun May 19 20:55:31 2019 New Revision: 1859523 URL: http://svn.apache.org/viewvc?rev=1859523&view=rev Log: Bug 63129 - JMeter can not identify encoding during first time page submission This closes #441 Bugzilla Id: 63129 Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/AbstractSamplerCreator.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Daemon.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java jmeter/trunk/xdocs/changes.xml *** Bug 63417 has been marked as a duplicate of this bug. *** This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4995 |