Author: sebb
Date: Wed Apr 16 16:56:34 2008
New Revision: 648901

URL: http://svn.apache.org/viewvc?rev=648901&view=rev
Log:
Bug 44807 - allow session ids to be terminated by backslash

Modified:
    jakarta/jmeter/trunk/docs/changes.html
    
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java
    
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java
    jakarta/jmeter/trunk/xdocs/changes.xml

Modified: jakarta/jmeter/trunk/docs/changes.html
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/changes.html?rev=648901&r1=648900&r2=648901&view=diff
==============================================================================
--- jakarta/jmeter/trunk/docs/changes.html (original)
+++ jakarta/jmeter/trunk/docs/changes.html Wed Apr 16 16:56:34 2008
@@ -523,6 +523,11 @@
                                                </li>
                                                                        
 
+                                                                               
                <li     >
+                                                               Bug 44807 - 
allow session ids to be terminated by backslash
+                                               </li>
+                                                                       
+
                                                </ul>
                                                                                
                                                                                
<h4     >
                                                                Non-functional 
changes

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java?rev=648901&r1=648900&r2=648901&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java
 Wed Apr 16 16:56:34 2008
@@ -165,7 +165,7 @@
 
                parameterRegexp = JMeterUtils.getPatternCache().getPattern(
                 // ;sessionid=value
-                               "[;\\?&]" + quotedArg + 
"=([^\"'>&\\s;]*)[&\\s\"'>;]?$?" +  // $NON-NLS-1$
+                               "[;\\?&]" + quotedArg + 
"=([^\"'>&\\s;\\\\]*)[&\\s\"'>;]?$?" +  // $NON-NLS-1$
                 
                 // name="sessionid" value="value"
                 "|\\s[Nn][Aa][Mm][Ee]\\s*=\\s*[\"']" + quotedArg

Modified: 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java?rev=648901&r1=648900&r2=648901&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java
 (original)
+++ 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java
 Wed Apr 16 16:56:34 2008
@@ -177,6 +177,22 @@
                        }
                }
 
+    public void testGrabSessionIdURLinJSON() throws Exception {
+                       String html = 
+                           "<a href=\"#\" 
onclick=\"$(\'frame\').src=\'/index?param1=bla&sessionid=xyzxyzxyz\\'";
+                       response = new SampleResult();
+                       response.setResponseData(html.getBytes());
+                       mod.setArgumentName("sessionid");
+                       HTTPSamplerBase sampler = createSampler();
+                       sampler.addArgument("sessionid", "xyzxyzxyz");
+                       context.setCurrentSampler(sampler);
+                       context.setPreviousResult(response);
+                       mod.process();
+                       Arguments args = sampler.getArguments();
+                       assertEquals("xyzxyzxyz", ((Argument) 
args.getArguments().get(0).getObjectValue())
+                                       .getValue());
+               }
+
         public void testCache() throws Exception {
             String[] html = new String[] { 
                     "<input name=\"sid\" value=\"myId\">", 

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=648901&r1=648900&r2=648901&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Wed Apr 16 16:56:34 2008
@@ -157,6 +157,7 @@
 <li>Bug 41921 - add option for samplers to store MD5 of response; done for 
HTTP Samplers.</li>
 <li>Regex Function can now also be applied to a variable rather than just the 
previous sample result.</li>
 <li>Remove HTML Parameter Mask,HTTP User Parameter Modifier from menus as they 
are deprecated</li>
+<li>Bug 44807 - allow session ids to be terminated by backslash</li>
 </ul>
 
 <h4>Non-functional changes</h4>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to