Bug 48372 - multibyte data getting corrupted with HTTP POST - when used JMeter 2.3.4
multibyte data getting corrupted with HTTP POST - when used JMeter 2.3.4
Status: RESOLVED INVALID
Product: JMeter
Classification: Unclassified
Component: HTTP
2.3.4
All All
: P1 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2009-12-10 22:50 UTC by jml
Modified: 2012-05-07 21:35 UTC (History)
2 users (show)



Attachments
contains 2 png image files showing the execution with jmeter 2.3.4 and 2.3RC4 (138.52 KB, application/zip)
2009-12-10 22:50 UTC, jml
Details
jmx sample file and jmeter properties file of both versions discussed (19.01 KB, application/zip)
2009-12-11 07:04 UTC, jml
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jml 2009-12-10 22:50:59 UTC
Created attachment 24689 [details]
contains 2 png image files showing the execution with jmeter 2.3.4 and 2.3RC4 

I had initially created a testplan using JMeter 2.3RC4  - because this was available as latest when i started using Jmeter for my work. All things were working absolutely fine on this.

About 2 days back i wanted to pick the latest available version of Jmeter and start using it . Hence i downloaded 2.3.4 official release version.  

so, opened my existing jmx testplan file using 2.3.4  & executed/run the testcase.


PROBLEM:
the multibyte data for the HTTP POST requests are getting garbled.
i.e
> if i run the same using 2.3RC4 - everything works fine - multibyte data is handled correctly.
> if i open same jmx file using 2.3.4  & run it  - multibyte data becomes garbled .


ATTACHMENTS: 
I have attached screen shots(two .png images are zipped): shows same testcase run on 2.3RC4 and 2.3.4 . If you notice in that pictures -  on 2.3RC4 the result is fine and multibyte data is also correct.  on 2.3.4 , the multibyte data is corrupted.



DETAILS:

The HTTP Request was created as follows :

>  Test Plan->Add->Thread Group. Entered the name and other fields.
>  Again Right Clicked on ThreadGroup->Add->Sampler->HTTP Request.
>  there i choose METHOD = POST .  [in some tests we need multi-part , in some
>  we need only POST]
>  Entered the name of the request and the Path/command . Typed UTF-8 in Content
>  Encoding textbox.
>  This is how that HTTP POST request is filled up.
>

Also in jmeter.properties file  :  i have given :
sampleresult.default.encoding  = UTF-8


When i run the testcases , the response assertion checks for a particular multibyte content in the http response received.  It fails because , i can see the HTTP Response  under View result tree  - which has been garbled.

The same testcase when run using 2.3RC4 works absolutely fine and testcase passes. There is absolutely no change b/w the way i run in 2.3.RC4 & 2.3.4 .  
With 2.3.4 it fails because multibyte content is getting corrupted.


NOTE:
The HTTP GET request handles the multibyte data correctly .The garbling issue is noticed only when i have HTTP POST.


Additional observation :
(in case if its relevant)
On 2.3.4 ,  After running the testcase . go to  View Result Tree , there is a node called "Sample Result". Under this the following entries are noticed for POST request:

   HTTPSampleResult fields:
   DataEncoding: ISO-8859-1

Now. If i change the HTTP request method to GET , the above is seen as follows:

   HTTPSampleResult fields:
   DataEncoding: utf-8


So - what is impacting this i do not know.  



ISSUE MARKED AS BLOCKER :
The issue iam raising as blocker because , all HTTP POST request's multibyte content is getting garbled if i use 2.3.4 .  Basically i cannot use 2.3.4 for running my tests having HTTP POST.

As workaround :  
iam just using the previous version that we had picked - 2.3RC4 itself. With 2.3.RC4 everything works absolutely fine.


Kindly fix the problem for 2.3.4.
Comment 1 Sebb 2009-12-11 03:51:42 UTC
As mentioned on the e-mail thread, please provide a JMX file that contains a sampler that fails on 2.3.4.

Please also provide jmeter.properties for both versions of JMeter.
Comment 2 jml 2009-12-11 07:04:27 UTC
Created attachment 24691 [details]
jmx sample file and jmeter properties file of both versions discussed
Comment 3 jml 2009-12-11 07:05:56 UTC
please find the attached zip file containing 3 files inside that - sample jmx file which has one of the testcase for HTTP POST Request that fails on 2.3.4 but passed on 2.3RC4  ,  and , there are jmeter.properties file of both jmeter versions.
Comment 4 Sebb 2009-12-11 15:46:29 UTC
Thanks for the JMX file. However, as far as I can tell, none of the HTTP requests actually contain any multibyte data, so it's not possible to determine what the problem is.
Comment 5 jml 2009-12-13 20:56:38 UTC
In the attached jmx file , i have given a simple command that is used in our testcase -  i.e the Export command  - which will get the entire calendar data from the calendar server, as part of the HTTP response.   . Now, that HTTP Response returned from the server has multibyte content - example calendar name , etc .. which are in non-english .

Please see the screenshots of the reponses that i have added in the zip file.
I have given the comparison of HTTP responses as seen under both Jmeter versions.

In the screenshot -  its clear that the HTTP Reponse is not being handled correctly by Jmeter 2.3.4 , when we have method as POST. 

If i just use Jmeter 2.3RC4 for the ditto jmx file , the HTTP response will be proper - see the screen shot again.


I gave just 1 sample testcase to show that the HTTP Response is not handled correctly - the multibyte data in the response are getting corrupted when handled by jmeter 2.3.4 .
That same jmx file works absolutely fine without any change when used with Jmeter 2.3RC4.

Please Let me know what other details would be required. may i know -Do you want me to send more testcases as samples/examples ?
Comment 6 Sebb 2009-12-14 05:13:07 UTC
Do I understand you correctly?
Is it only the response that differs between 2.3RC4 and 2.3.4?

What do the corresponding Sampler Result pages show?

Just noticed that the image of the View Results Tree in 2.3.4 looks completely different from normal. The buttons are rounded, and the tabs look completely different. Also the test tree looks different.

Are you sure you are using the official build of JMeter 2.3.4?
Are you using the same version of Java for both tests, if so which?
Comment 7 jml 2009-12-14 20:38:01 UTC
Please find my comments below for the questions you had asked :


<<<<< Is it only the response that differs between 2.3RC4 and 2.3.4?>>>>>>>

the multibyte content inside the response is seen garbled with 2.3.4 , whereas in 2.3RC4 its proper.
here is the overview :

* iam sending a HTTP POST request(i have explained already how the request is formed and sent, as shown in sample jmx file).

* then checking the response received (i.e iam viewing this under the "View result tree" , under that the node called HTTP response. I have shown this in attached screenshots)

* in that response it has multibyte content(like calendar names etc in non-english) . problem is -those multibyte data is garbled in response(when in 2.3.4)



<<<<<<<<<What do the corresponding Sampler Result pages show?>>>>>>>>>>>>

i did not understand this question clearly -- i have sent the screen shots for result - i.e of the view result tree. That shows how the result is seen.



<<<<<<<<Just noticed that the image of the View Results Tree in 2.3.4 looks completely different from normal. The buttons are rounded, and the tabs look completely different. Also the test tree looks different.
Are you sure you are using the official build of JMeter 2.3.4? >>>>>>>>>>>

i accessed this page for download :
   http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi
on this page : i clicked the Binary- "2.3.4.zip" link and downloaded the zip file .
is this not the official release of 2.3.4 ?



<<<<<<Are you using the same version of Java for both tests, if so which?>>>>>>>
yes. same version of Java all the time.  I mean,  i have my terminal set with JAVA_HOME to version 1.5.0_13. On same terminal i open the jmeter gui --for both versions.
am i correct in understanding that jmeter takes java as per the terminal setting- or do i need to set that explicitly anywhere for 2.3.4 ?
Comment 8 Sebb 2009-12-15 02:43:51 UTC
(In reply to comment #7)
> Please find my comments below for the questions you had asked :
> 
> 
> <<<<<<<<<What do the corresponding Sampler Result pages show?>>>>>>>>>>>>
> 
> i did not understand this question clearly -- i have sent the screen shots for
> result - i.e of the view result tree. That shows how the result is seen.
> 

There are 3 tabs; I need to see the contents of the "Sampler result" tab.

Probably a good idea to include the "Request" tab contents too.
 
> 
> <<<<<<<<Just noticed that the image of the View Results Tree in 2.3.4 looks
> completely different from normal. The buttons are rounded, and the tabs look
> completely different. Also the test tree looks different.
> Are you sure you are using the official build of JMeter 2.3.4? >>>>>>>>>>>
> 
> i accessed this page for download :
>    http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi
> on this page : i clicked the Binary- "2.3.4.zip" link and downloaded the zip
> file .
> is this not the official release of 2.3.4 ?
 
Yes, this is the one.
 
> 
> <<<<<<Are you using the same version of Java for both tests, if so
> which?>>>>>>>
> yes. same version of Java all the time.  I mean,  i have my terminal set with
> JAVA_HOME to version 1.5.0_13. On same terminal i open the jmeter gui --for
> both versions.
> am i correct in understanding that jmeter takes java as per the terminal
> setting- or do i need to set that explicitly anywhere for 2.3.4 ?

No, JMeter picks up whichever version of Java is first on the path.

The JMeter GUI should look similar in both versions, assuming that they are using the same JVM. On Windows there are slight variations between Java 1.4/1.5/1.6, but the shape of buttons does not change, and tabs always look like tabs.

Please attach jmeter.log from each version of JMeter. There may be sensitive information in it; if so please replace with something innocuous first.
Comment 9 Philippe Mouawad 2011-09-07 18:20:30 UTC
Hello,
Regarding the look, it's related to Mac OS, this look is the one on this OS.
I have the same look running JDK 6 on Mac OS 10.6.8

Regards
Philippe
Comment 10 Philippe Mouawad 2012-05-07 21:35:37 UTC
I checked code and I don't see issue on response conversion to String.
I close issue as we cannot reproduce it and issue was not updated since 2009 by reporter.