You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2004/10/07 19:52:35 UTC

cvs commit: jakarta-jmeter/xdocs/usermanual component_reference.xml

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 @@
           <property name="Path Extension" required="No">Some web apps rewrite URLs by appending
           a semi-colon plus the session id parameter.  Check this box if that is so.</property>
           <property name="Do not use equals in path extension" required="No">Some web apps rewrite URLs without using an &quot;=&quot; sign between the parameter name and value (such as Intershop Enfinity).</property>
  +        <property name="Do not use questionmark in path extension" required="No">Prevents the query string to end up in the path extension (such as Intershop Enfinity).</property>
   </properties>
   </component>
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org