Bug 52678

Summary: Proxy : When doing replacement of UserDefinedVariables, partial values should not be substituted
Product: JMeter - Now in Github Reporter: Philippe Mouawad <p.mouawad>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal CC: jens_0, p.mouawad
Priority: P2    
Version: 2.6   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Philippe Mouawad 2012-02-16 09:31:23 UTC
Example:
If have a UDV : wsport set to 80
In a captured request I have 80754, it gets replaced by : ${wsport}754

In my opinion replacement should only be done on full word.
Comment 1 Philippe Mouawad 2012-02-17 17:41:25 UTC
Date: Fri Feb 17 16:56:20 2012
New Revision: 1245652

URL: http://svn.apache.org/viewvc?rev=1245652&view=rev
Log:
Bug 52678 - Proxy : When doing replacement of UserDefinedVariables, partial values should not be substituted

Modified:
   jmeter/trunk/src/core/org/apache/jmeter/engine/util/ReplaceFunctionsWithStrings.java
   jmeter/trunk/xdocs/changes.xml
   jmeter/trunk/xdocs/usermanual/component_reference.xml
Comment 2 jens_0 2012-09-06 14:53:23 UTC
This change does only work when "Regex matching" is activated.
Shouldn't StringUtilities.substitute be changed the same way?
Comment 3 Philippe Mouawad 2012-09-08 14:01:49 UTC
Documentation says:
Regex Matching 	: Use Regex Matching when replacing variables? If checked replacement will use word boundaries, ie it will only replace word matching values of variable, not part of a word. A word boundary follows Perl5 definition and is equivalent to \b. 

So I think it is clear and changing this would break this contract.

Another point, it's ReplaceFunctionsWithStrings that is concerned not StringUtilities.

I close as resolved (not WONTFIX as it has been fixed).

If you disagree you can open a new BUG or ENHANCEMENT referencing this one.

Thank you
Regards
Philippe
Comment 4 jens_0 2012-09-27 12:57:45 UTC
The name "Regex matching" for this option does not seem to be clear then...
Comment 5 The ASF infrastructure team 2022-09-24 20:37:49 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2737