Hi, I am creating load test for a Window service application. Packets are sent at socket. But some packets gets converted. Packets are being sent using TCP sampler It is sent in ANSI form. The problem is that 8F and 90 (In Hex format) is interpreted/sent as 3F and the packet gets corrupted. Also a lot of zeroes get appended in the end. Some packets are running fine but some packets get converted.
Not exactly clear what the problem is here. Can you provide a simple JMX file that shows the problem?
Hello, Analyzing code of TCPClientImpl , it does conversion from byte array to String without setting any charset, so file.encoding of JVM will be used. This may explain issues mentionned here with ANSI (Windows-1252) charset, although HEX is mentionned. Shouldn't we add a field to input charset ?
Both reading and writing use the default charset, because they both convert between byte and string. The simplest would be to add a property to control the encoding (as is done for the eolByte); this should be stored in the sample result as well.
Fixed if org.apache.jmeter.protocol.tcp.sampler.TCPClientImpl was used as Implementation. Date: Sat Feb 4 14:32:42 2012 New Revision: 1240507 URL: http://svn.apache.org/viewvc?rev=1240507&view=rev Log: Bug 51737 - TCPSampler : Packet gets converted/corrupted Modified: jmeter/trunk/bin/jmeter.properties jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java jmeter/trunk/xdocs/changes.xml
Date: Sat Feb 4 14:37:45 2012 New Revision: 1240509 URL: http://svn.apache.org/viewvc?rev=1240509&view=rev Log: Bug 51737 - TCPSampler : Packet gets converted/corrupted
Date: Sat Feb 4 15:01:11 2012 New Revision: 1240514 URL: http://svn.apache.org/viewvc?rev=1240514&view=rev Log: Bug 51737 - TCPSampler : Packet gets converted/corrupted Added encoding to SampleResult Modified: jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/AbstractTCPClient.java jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClient.java jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2520