Return-Path: Delivered-To: apmail-jakarta-jmeter-dev-archive@www.apache.org Received: (qmail 47019 invoked from network); 7 Oct 2004 17:52:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 7 Oct 2004 17:52:51 -0000 Received: (qmail 52959 invoked by uid 500); 7 Oct 2004 17:52:41 -0000 Delivered-To: apmail-jakarta-jmeter-dev-archive@jakarta.apache.org Received: (qmail 52878 invoked by uid 500); 7 Oct 2004 17:52:40 -0000 Mailing-List: contact jmeter-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "JMeter Developers List" Reply-To: "JMeter Developers List" Delivered-To: mailing list jmeter-dev@jakarta.apache.org Received: (qmail 52753 invoked by uid 500); 7 Oct 2004 17:52:38 -0000 Received: (qmail 52718 invoked by uid 99); 7 Oct 2004 17:52:38 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 07 Oct 2004 10:52:37 -0700 Received: (qmail 46902 invoked by uid 1721); 7 Oct 2004 17:52:35 -0000 Date: 7 Oct 2004 17:52:35 -0000 Message-ID: <20041007175235.46901.qmail@minotaur.apache.org> From: sebb@apache.org To: jakarta-jmeter-cvs@apache.org Subject: cvs commit: jakarta-jmeter/xdocs/usermanual component_reference.xml X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N sebb 2004/10/07 10:52:35 Modified: src/protocol/http/org/apache/jmeter/protocol/http/modifier/gui Tag: rel-2_0 URLRewritingModifierGui.java src/core/org/apache/jmeter/resources Tag: rel-2_0 messages.properties src/protocol/http/org/apache/jmeter/protocol/http/modifier Tag: rel-2_0 URLRewritingModifier.java xdocs/usermanual Tag: rel-2_0 component_reference.xml Log: Allow modification to stop at "?" - see http://www.mail-archive.com/jmeter-dev@jakarta.apache.org/msg08241.html Revision Changes Path No revision No revision 1.12.2.1 +12 -2 jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/modifier/gui/URLRewritingModifierGui.java Index: URLRewritingModifierGui.java =================================================================== RCS file: /home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/modifier/gui/URLRewritingModifierGui.java,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -u -r1.12 -r1.12.2.1 --- URLRewritingModifierGui.java 5 Mar 2004 01:38:17 -0000 1.12 +++ URLRewritingModifierGui.java 7 Oct 2004 17:52:35 -0000 1.12.2.1 @@ -37,6 +37,7 @@ JLabeledTextField argumentName; JCheckBox pathExt; JCheckBox pathExtNoEquals; + JCheckBox pathExtNoQuestionmark; public String getLabelResource() { @@ -72,6 +73,11 @@ JMeterUtils.getResString("path_extension_dont_use_equals")); mainPanel.add(pathExtNoEquals); + pathExtNoQuestionmark = + new JCheckBox( + JMeterUtils.getResString("path_extension_dont_use_questionmark")); + mainPanel.add(pathExtNoQuestionmark); + add(mainPanel, BorderLayout.CENTER); } @@ -98,6 +104,8 @@ pathExt.isSelected()); ((URLRewritingModifier) modifier).setPathExtensionNoEquals( pathExtNoEquals.isSelected()); + ((URLRewritingModifier) modifier).setPathExtensionNoQuestionmark( + pathExtNoQuestionmark.isSelected()); } public void configure(TestElement el) @@ -106,6 +114,8 @@ pathExt.setSelected(((URLRewritingModifier) el).isPathExtension()); pathExtNoEquals.setSelected( ((URLRewritingModifier) el).isPathExtensionNoEquals()); + pathExtNoQuestionmark.setSelected( + ((URLRewritingModifier) el).isPathExtensionNoQuestionmark()); super.configure(el); } No revision No revision 1.106.2.10 +1 -0 jakarta-jmeter/src/core/org/apache/jmeter/resources/messages.properties Index: messages.properties =================================================================== RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages.properties,v retrieving revision 1.106.2.9 retrieving revision 1.106.2.10 diff -u -r1.106.2.9 -r1.106.2.10 --- messages.properties 6 Oct 2004 01:58:59 -0000 1.106.2.9 +++ messages.properties 7 Oct 2004 17:52:35 -0000 1.106.2.10 @@ -310,6 +310,7 @@ path=Path\: path_extension_choice=Path Extension (use ";" as separator) path_extension_dont_use_equals=Do not use equals in path extension (Intershop Enfinity compatibility) +path_extension_dont_use_questionmark=Do not use questionmark in path extension (Intershop Enfinity compatibility) patterns_to_exclude=Patterns to Exclude patterns_to_include=Patterns to Include pkcs12_desc=PKCS 12 Key (*.p12) No revision No revision 1.29.2.2 +50 -9 jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java Index: URLRewritingModifier.java =================================================================== RCS file: /home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java,v retrieving revision 1.29.2.1 retrieving revision 1.29.2.2 diff -u -r1.29.2.1 -r1.29.2.2 --- URLRewritingModifier.java 3 Jul 2004 02:07:53 -0000 1.29.2.1 +++ URLRewritingModifier.java 7 Oct 2004 17:52:35 -0000 1.29.2.2 @@ -49,12 +49,18 @@ implements Serializable, PreProcessor { - private Pattern pathExtensionEqualsRegexp, parameterRegexp, pathExtensionNoEqualsRegexp; + private Pattern pathExtensionEqualsQuestionmarkRegexp; + private Pattern pathExtensionEqualsNoQuestionmarkRegexp; + private Pattern parameterRegexp; + private Pattern pathExtensionNoEqualsQuestionmarkRegexp; + private Pattern pathExtensionNoEqualsNoQuestionmarkRegexp; //transient Perl5Compiler compiler = new Perl5Compiler(); private final static String ARGUMENT_NAME = "argument_name"; private final static String PATH_EXTENSION = "path_extension"; private final static String PATH_EXTENSION_NO_EQUALS = "path_extension_no_equals"; + private final static String PATH_EXTENSION_NO_QUESTIONMARK = + "path_extension_no_questionmark"; public void process() { @@ -69,17 +75,33 @@ String text = new String(responseText.getResponseData()); Perl5Matcher matcher = JMeterUtils.getMatcher(); String value = ""; - if (isPathExtension() && isPathExtensionNoEquals()) + if (isPathExtension() && isPathExtensionNoEquals() && isPathExtensionNoQuestionmark()) { - if (matcher.contains(text, pathExtensionNoEqualsRegexp)) + if (matcher.contains(text, pathExtensionNoEqualsNoQuestionmarkRegexp)) { MatchResult result = matcher.getMatch(); value = result.group(1); } } - else if (isPathExtension()) // && ! isPathExtensionNoEquals + else if (isPathExtension() && isPathExtensionNoEquals()) // && ! isPathExtensionNoQuestionmark { - if (matcher.contains(text, pathExtensionEqualsRegexp)) + if (matcher.contains(text, pathExtensionNoEqualsQuestionmarkRegexp)) + { + MatchResult result = matcher.getMatch(); + value = result.group(1); + } + } + else if (isPathExtension() && isPathExtensionNoQuestionmark()) // && ! isPathExtensionNoEquals + { + if (matcher.contains(text, pathExtensionEqualsNoQuestionmarkRegexp)) + { + MatchResult result = matcher.getMatch(); + value = result.group(1); + } + } + else if (isPathExtension()) // && ! isPathExtensionNoEquals && ! isPathExtensionNoQuestionmark + { + if (matcher.contains(text, pathExtensionEqualsQuestionmarkRegexp)) { MatchResult result = matcher.getMatch(); value = result.group(1); @@ -128,16 +150,26 @@ } private void initRegex(String argName) { - pathExtensionEqualsRegexp = + pathExtensionEqualsQuestionmarkRegexp = JMeterUtils.getPatternCache().getPattern( ";"+argName + "=([^\"'>&\\s;]*)[&\\s\"'>;]?$?", Perl5Compiler.MULTILINE_MASK | Perl5Compiler.READ_ONLY_MASK); - pathExtensionNoEqualsRegexp = + pathExtensionEqualsNoQuestionmarkRegexp = + JMeterUtils.getPatternCache().getPattern( + ";"+argName + "=([^\"'>&\\s;?]*)[&\\s\"'>;?]?$?", + Perl5Compiler.MULTILINE_MASK | Perl5Compiler.READ_ONLY_MASK); + + pathExtensionNoEqualsQuestionmarkRegexp = JMeterUtils.getPatternCache().getPattern( ";"+argName + "([^\"'>&\\s;]*)[&\\s\"'>;]?$?", Perl5Compiler.MULTILINE_MASK | Perl5Compiler.READ_ONLY_MASK); + pathExtensionNoEqualsNoQuestionmarkRegexp = + JMeterUtils.getPatternCache().getPattern( + ";"+argName + "([^\"'>&\\s;?]*)[&\\s\"'>;?]?$?", + Perl5Compiler.MULTILINE_MASK | Perl5Compiler.READ_ONLY_MASK); + parameterRegexp = JMeterUtils.getPatternCache().getPattern( "[;\\?&]"+argName + "=([^\"'>&\\s;]*)[&\\s\"'>;]?$?" @@ -174,6 +206,11 @@ setProperty( new BooleanProperty(PATH_EXTENSION_NO_EQUALS, pathExtNoEquals)); } + public void setPathExtensionNoQuestionmark(boolean pathExtNoQuestionmark) + { + setProperty( + new BooleanProperty(PATH_EXTENSION_NO_QUESTIONMARK, pathExtNoQuestionmark)); + } public boolean isPathExtension() { return getPropertyAsBoolean(PATH_EXTENSION); @@ -181,6 +218,10 @@ public boolean isPathExtensionNoEquals() { return getPropertyAsBoolean(PATH_EXTENSION_NO_EQUALS); + } + public boolean isPathExtensionNoQuestionmark() + { + return getPropertyAsBoolean(PATH_EXTENSION_NO_QUESTIONMARK); } // TODO: add test cases for new jakarta commons http client No revision No revision 1.87.2.9 +4 -3 jakarta-jmeter/xdocs/usermanual/component_reference.xml Index: component_reference.xml =================================================================== RCS file: /home/cvs/jakarta-jmeter/xdocs/usermanual/component_reference.xml,v retrieving revision 1.87.2.8 retrieving revision 1.87.2.9 diff -u -r1.87.2.8 -r1.87.2.9 --- component_reference.xml 7 Oct 2004 00:51:30 -0000 1.87.2.8 +++ component_reference.xml 7 Oct 2004 17:52:35 -0000 1.87.2.9 @@ -1638,6 +1638,7 @@ Some web apps rewrite URLs by appending a semi-colon plus the session id parameter. Check this box if that is so. Some web apps rewrite URLs without using an "=" sign between the parameter name and value (such as Intershop Enfinity). + Prevents the query string to end up in the path extension (such as Intershop Enfinity). --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org