Author: pmouawad Date: Tue Feb 28 12:05:02 2012 New Revision: 1294598 URL: http://svn.apache.org/viewvc?rev=1294598&view=rev Log: Bug 52781 - Content-Disposition header garbled even if browser compatible headers is checked (HC4) Fixed wrong Boundary extraction Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java?rev=1294598&r1=1294597&r2=1294598&view=diff ============================================================================== --- jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java (original) +++ jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java Tue Feb 28 12:05:02 2012 @@ -1084,7 +1084,14 @@ public class TestHTTPSamplersAgainstHttp Pattern pattern = JMeterUtils.getPattern(regularExpression, Perl5Compiler.READ_ONLY_MASK | Perl5Compiler.CASE_INSENSITIVE_MASK | Perl5Compiler.MULTILINE_MASK); if(localMatcher.contains(requestHeaders, pattern)) { MatchResult match = localMatcher.getMatch(); - return match.group(1); + String matchString = match.group(1); + // Header may contain ;charset= , regexp extracts it so computed boundary is wrong + int indexOf = matchString.indexOf(";"); + if(indexOf>=0) { + return matchString.substring(0, indexOf); + } else { + return matchString; + } } else { return null;