You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2017/02/23 12:16:30 UTC
svn commit: r1784115 -
/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
Author: pmouawad
Date: Thu Feb 23 12:16:30 2017
New Revision: 1784115
URL: http://svn.apache.org/viewvc?rev=1784115&view=rev
Log:
Bug 54525 Search Feature : Enhance it with ability to replace
Bugzilla Id: 54525
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java?rev=1784115&r1=1784114&r2=1784115&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java Thu Feb 23 12:16:30 2017
@@ -2066,6 +2066,18 @@ public abstract class HTTPSamplerBase ex
totalReplaced += nbReplaced;
}
}
+
+ if(!StringUtils.isEmpty(getDomain())) {
+ Object[] result = JOrphanUtils.replaceAllWithRegex(getDomain(), regex, replaceBy, caseSensitive);
+ // check if there is anything to replace
+ int nbReplaced = ((Integer)result[1]).intValue();
+ if (nbReplaced>0) {
+ totalReplaced += nbReplaced;
+ String replacedText = (String) result[0];
+ setDomain(replacedText);
+ totalReplaced += nbReplaced;
+ }
+ }
return totalReplaced;
}
}