https://bz.apache.org/bugzilla/show_bug.cgi?id=63129

            Bug ID: 63129
           Summary: JMeter can not identify encoding during first time
                    page Submission.
           Product: JMeter
           Version: 5.0
          Hardware: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: HTTP
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: JMETER_5.1

Created attachment 36401
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36401&action=edit
Application to reproduce the scenario.

Overview: When we post the Japanese characters from browser using JMeter
HTTP(s) Test Script Recorder, we get garbage value in response when we post the
request first time. However, if we post the same request again, we get actual
output. So, from second execution onward it starts working fine. 

Cause of bug: JMeter is getting encoding as null in HTTP request. When JMeter
gets encoding as null, it uses default encoding (UTF-8). therefore returning
garbage value when encoding/decoding of characters(e.g. Japanese characters)
other than UTF-8. However, JMeter records encoding when response comes from the
web server, so it  starts working when we traverse same page again.

Impact of bug:
1. When End User traverse the page first time and posts any character String
other than UTF-8 using JMeter proxy. End user gets garbage value in response of
his first request. E.g. Shift-JIS characters are not supported by UTF-8 and
return garbage value.
2. Many Japanese company uses JMeter for performance testing of their project
So Whenever Japanese engineer, uses JMeter for their performance testing they
did not get actual result after first request.

Reproduce condition: 

1. Page Encoding should be Shift_JIS.
2. Request  and response page encoding should be same.
3. Form method should be POST.

Steps to reproduce: 

Setup 
1. Deploy Application "jmeter_issue_Encoding_Store"(extract in
apache-tomcat-9.0.12\webapps) in Tomcat and start the tomcat(execute
"apache-tomcat-9.0.12\bin\startup.bat" .
2. Open the browser and change Proxy settings -> LAN Setting and set
Address(eg: localhost) and port(e.g.8888).
3. Run JMeter
        3.1 click on file menu-> open ->open the attached "Test Plan.jmx" file.
        3.2 Set the same port number in “HTTP(s) Test Script Recorder” and in
browser’s Network LAN Settings.
        3.3 Go to JMeter HTTP(s) Test Script Recorder -> Click Start -> Ok


Execution
1. Go to browser , open application (e.g.
http://localhost:portNumber/jmeter_issue_Encoding_Store/index.jsp)

2. Click on Submit Button.

3. View result in browser.
Resultant Output: It is garbage text:  ?ソス?ソス?ソス?ソス?ソスl?ソス?ソス?ソスs

Expected Result: 初期大阪
Actual Result: ?ソス?ソス?ソス?ソス?ソスl?ソス?ソス?ソスs

4. click on "Back to previous page" and click on "Submit" button again.
5. View the result in browser, this time getting the actual result.

Expected Result: 初期大阪
Actual Result: 初期大阪

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to