Bug 28715 - allow variables in Cookie Manager

git-svn-id: https://svn.apache.org/repos/asf/jakarta/jmeter/branches/rel-2-2@571789 13f79535-47bb-0310-9956-ffa450edef68

Former-commit-id: 776c562c27
This commit is contained in:
Sebastian Bazley 2007-09-01 12:40:35 +00:00
parent bc6254c718
commit 6e1586c24b
3 changed files with 12 additions and 0 deletions

View File

@ -532,6 +532,10 @@ beanshell.server.file=../extras/startup.bsh
# Default is true. Use false to revert to original behaviour
#CookieManager.delete_null_cookies=true
# CookieManager behaviour - should variable cookies be allowed?
# Default is true. Use false to revert to original behaviour
#CookieManager.allow_variable_cookies=true
# (2.0.3) JMeterThread behaviour has been changed to set the started flag before
# the controllers are initialised. This is so controllers can access variables earlier.
# In case this causes problems, the previous behaviour can be restored by uncommenting

View File

@ -69,6 +69,10 @@ public class CookieManager extends ConfigTestElement implements TestListener, Se
private static final boolean DELETE_NULL_COOKIES
= JMeterUtils.getPropDefault("CookieManager.delete_null_cookies", true);// $NON-NLS-1$
// See bug 28715
private static final boolean ALLOW_VARIABLE_COOKIES
= JMeterUtils.getPropDefault("CookieManager.allow_variable_cookies", true);// $NON-NLS-1$
private transient CookieSpec cookieSpec;
public static final String DEFAULT_POLICY = CookiePolicy.BROWSER_COMPATIBILITY;
@ -288,7 +292,10 @@ public class CookieManager extends ConfigTestElement implements TestListener, Se
int i=0;
for (PropertyIterator iter = getCookies().iterator(); iter.hasNext();) {
Cookie jmcookie = (Cookie) iter.next().getObjectValue();
// Set to running version, to allow function evaluation for the cookie values (bug 28715)
if (ALLOW_VARIABLE_COOKIES) jmcookie.setRunningVersion(true);
cookies[i++] = makeCookie(jmcookie);
if (ALLOW_VARIABLE_COOKIES) jmcookie.setRunningVersion(false);
}
String host = url.getHost();
String protocol = url.getProtocol();

View File

@ -48,6 +48,7 @@
<li>Bug 42947 - TestBeanGUI changes not picked up when short-cut keys used</li>
<li>Added serializer.jar (needed for update to xalan 2.7.0)</li>
<li>Bug 38687 - Module controller does not work in non-GUI mode</li>
<li>Bug 28715 - allow variable cookie values (set CookieManager.allow_variable_cookies=false to disable)</li>
</ul>
<h4>Improvements since 2.3RC3</h4>