Bug 61314

Summary: HTTP URL Re-writing Modifier doesn't replace existing jsessionid in http sampler, but adds to the end
Product: JMeter Reporter: Alex <efolder>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal CC: p.mouawad
Priority: P2    
Version: 3.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: url_rewriting_testplan

Description Alex 2017-07-17 19:28:08 UTC
Created attachment 35149 [details]
url_rewriting_testplan

HTTP URL Re-writing Modifier doesn't replace existing jsessionid in http sampler, but add to the end:

http request:-------------------------------------

http://jmeterbook-berinle.rhcloud.com/urlRewrite/link3;jsessionid=657CF77A86183868CF30AC36321394B7;jsessionid=E258B23B7BA595741CBEB89FEEB03EFD

http request:-------------------------------------


OLD existing value: jsessionid=657CF77A86183868CF30AC36321394B7;
new value: jsessionid=E258B23B7BA595741CBEB89FEEB03EFD

Actual result:

http://jmeterbook-berinle.rhcloud.com/urlRewrite/link3;jsessionid=657CF77A86183868CF30AC36321394B7;jsessionid=E258B23B7BA595741CBEB89FEEB03EFD

Expected result:
If the request already has a value (jsessionid=657CF77A86183868CF30AC36321394B7), it will be replaced(;jsessionid=E258B23B7BA595741CBEB89FEEB03EFD)

http://jmeterbook-berinle.rhcloud.com/urlRewrite/link3;jsessionid=E258B23B7BA595741CBEB89FEEB03EFD
Comment 1 Philippe Mouawad 2017-07-20 20:36:37 UTC
Author: pmouawad
Date: Thu Jul 20 20:36:15 2017
New Revision: 1802530

URL: http://svn.apache.org/viewvc?rev=1802530&view=rev
Log:
Bug 61314 - HTTP URL Re-writing Modifier doesn't replace existing jsessionid in http sampler, but adds to the end
Bugzilla Id: 61314

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java
    jmeter/trunk/xdocs/changes.xml
Comment 2 Philippe Mouawad 2017-07-20 20:37:03 UTC
Thanks for report, could you test nightly build tomorrow and give feedback.
This will be in 3.3