Bug 61314 - HTTP URL Re-writing Modifier doesn't replace existing jsessionid in http sampler, but adds to the end
Summary: HTTP URL Re-writing Modifier doesn't replace existing jsessionid in http samp...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.2
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-17 19:28 UTC by Alex
Modified: 2017-07-20 20:37 UTC (History)
1 user (show)



Attachments
url_rewriting_testplan (31.30 KB, application/xml)
2017-07-17 19:28 UTC, Alex
Details

Note You need to log in before you can comment on or make changes to this bug.
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