When using proxy for recording traffic, if any request has specified a charset in single-quotes it produces java.nio.charset.IllegalCharsetNameException. If request is something like this: <meta http-equiv="Content-Type" content="text/html;charset='UTF-8'"> The following exception occurs: 2013/12/04 14:08:48 ERROR - jmeter.protocol.http.proxy.Proxy: Not implemented (probably used https) java.nio.charset.IllegalCharsetNameException: 'UTF-8' at java.nio.charset.Charset.checkName(Charset.java:284) at java.nio.charset.Charset.lookup2(Charset.java:458) at java.nio.charset.Charset.lookup(Charset.java:437) at java.nio.charset.Charset.isSupported(Charset.java:479) at org.apache.jmeter.protocol.http.util.ConversionUtils.getEncodingFromContentType(ConversionUtils.java:73) at org.apache.jmeter.protocol.http.proxy.Proxy.addPageEncoding(Proxy.java:493) at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:215)
Additionally, the Proxy class should catch IllegalCharsetNameException, log a warning and then treat it the same as an unsupported charset.
Date: Fri Dec 6 20:03:20 2013 New Revision: 1548710 URL: http://svn.apache.org/r1548710 Log: Bug 55852 - Be more lenient in parsing when charset value is surrounded with single quotes Bugzilla Id: 55852 Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/ConversionUtils.java jmeter/trunk/xdocs/changes.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3281