Bug 52678 - Proxy : When doing replacement of UserDefinedVariables, partial values should not be substituted
Proxy : When doing replacement of UserDefinedVariables, partial values should...
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: HTTP
2.6
All All
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-02-16 09:31 UTC by Philippe Mouawad
Modified: 2012-09-27 12:57 UTC (History)
2 users (show)



Attachments

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