You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2008/10/25 16:47:40 UTC

svn commit: r707849 - in /jakarta/jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/control/CookieManager.java xdocs/changes.xml

Author: sebb
Date: Sat Oct 25 07:47:39 2008
New Revision: 707849

URL: http://svn.apache.org/viewvc?rev=707849&view=rev
Log:
Cookie Manager now saves/restores cookie versions

Modified:
    jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieManager.java
    jakarta/jmeter/trunk/xdocs/changes.xml

Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieManager.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieManager.java?rev=707849&r1=707848&r2=707849&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieManager.java (original)
+++ jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieManager.java Sat Oct 25 07:47:39 2008
@@ -84,6 +84,7 @@
     public static final String DEFAULT_POLICY = CookiePolicy.BROWSER_COMPATIBILITY;
 
     public CookieManager() {
+        clearCookies(); // Ensure that there is always a collection available
     }
 
     // ensure that the initial cookies are copied to the per-thread instances
@@ -294,6 +295,7 @@
                );
         ret.setPathAttributeSpecified(jmc.isPathSpecified());
         ret.setDomainAttributeSpecified(jmc.isDomainSpecified());
+        ret.setVersion(jmc.getVersion());
         return ret;
     }
 
@@ -394,6 +396,7 @@
 
             // Store session cookies as well as unexpired ones
             if (exp == 0 || exp >= System.currentTimeMillis()) {
+                newCookie.setVersion(cookies[i].getVersion());
                 add(newCookie); // Has its own debug log; removes matching cookies
             } else {
                 removeMatchingCookies(newCookie);

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=707849&r1=707848&r2=707849&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Sat Oct 25 07:47:39 2008
@@ -134,6 +134,7 @@
 <li>Bug 46016 - avoid possible NPE in JMSSampler</li>
 <li>Cookie Manager was not passing cookie policy to runtime threads so they always used compatibility mode</li>
 <li>Add version attribute to JMeter Cookie class (needed for proper cookie support)</li>
+<li>Cookie Manager now saves/restores cookie versions</li>
 </ul>
 
 <h3>Improvements</h3>



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org