ASF Bugzilla – Attachment 21823 Details for
Bug 44807
Backslashes included in sessionid when using URLRewritingModifier
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated patch for session id parsing, including unittest
URLRewritingModifier_Backslash_incl_Unittest.patch (text/plain), 2.22 KB, created by
Jens Hoffrichter
on 2008-04-16 08:10:27 UTC
(
hide
)
Description:
Updated patch for session id parsing, including unittest
Filename:
MIME Type:
Creator:
Jens Hoffrichter
Created:
2008-04-16 08:10:27 UTC
Size:
2.22 KB
patch
obsolete
>diff -Nur jakarta-jmeter-2.3.1/src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java jakarta-jmeter-2.3.1.fixed/src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java >--- jakarta-jmeter-2.3.1/src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java 2007-11-28 14:11:41.000000000 +0100 >+++ jakarta-jmeter-2.3.1.fixed/src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java 2008-04-16 17:04:24.303335891 +0200 >@@ -169,7 +169,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 >diff -Nur jakarta-jmeter-2.3.1/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java jakarta-jmeter-2.3.1.fixed/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java >--- jakarta-jmeter-2.3.1/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java 2007-11-28 14:09:49.000000000 +0100 >+++ jakarta-jmeter-2.3.1.fixed/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java 2008-04-16 17:05:33.423309105 +0200 >@@ -177,6 +177,21 @@ > } > } > >+ public void testGrabSessionIdURLinJSON() throws Exception { >+ String html = "/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\">",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 44807
:
21816
| 21823