View | Details | Raw Unified | Return to bug 44807
Collapse All | Expand All

(-)jakarta-jmeter-2.3.1/src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java (-1 / +1 lines)
Lines 169-175 Link Here
169
169
170
		parameterRegexp = JMeterUtils.getPatternCache().getPattern(
170
		parameterRegexp = JMeterUtils.getPatternCache().getPattern(
171
                // ;sessionid=value
171
                // ;sessionid=value
172
				"[;\\?&]" + quotedArg + "=([^\"'>&\\s;]*)[&\\s\"'>;]?$?" +  // $NON-NLS-1$
172
				"[;\\?&]" + quotedArg + "=([^\"'>&\\s;\\\\]*)[&\\s\"'>;]?$?" +  // $NON-NLS-1$
173
                
173
                
174
                // name="sessionid" value="value"
174
                // name="sessionid" value="value"
175
                "|\\s[Nn][Aa][Mm][Ee]\\s*=\\s*[\"']" + quotedArg
175
                "|\\s[Nn][Aa][Mm][Ee]\\s*=\\s*[\"']" + quotedArg
(-)jakarta-jmeter-2.3.1/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java (+15 lines)
Lines 177-182 Link Here
177
			}
177
			}
178
		}
178
		}
179
179
180
    public void testGrabSessionIdURLinJSON() throws Exception {
181
			String html = "/index?param1=bla&sessionid=xyzxyzxyz\\'";
182
			response = new SampleResult();
183
			response.setResponseData(html.getBytes());
184
			mod.setArgumentName("sessionid");
185
			HTTPSamplerBase sampler = createSampler();
186
			sampler.addArgument("sessionid", "xyzxyzxyz");
187
			context.setCurrentSampler(sampler);
188
			context.setPreviousResult(response);
189
			mod.process();
190
			Arguments args = sampler.getArguments();
191
			assertEquals("xyzxyzxyz", ((Argument) args.getArguments().get(0).getObjectValue())
192
					.getValue());
193
		}
194
180
        public void testCache() throws Exception {
195
        public void testCache() throws Exception {
181
            String[] html = new String[] { 
196
            String[] html = new String[] { 
182
                    "<input name=\"sid\" value=\"myId\">", 
197
                    "<input name=\"sid\" value=\"myId\">", 

Return to bug 44807