When using HttpClient4 the HTTP Cookie Manager "Clear cookies each iteration?" setting has no effect. Even with this setting enabled, cookies are not being cleared between iterations on the same thread. This affects both HTTP and HTTPS protocol. The same exact setup using the Implementation HttpClient3.1 or Java have not got the problem. JMeter, however, does not report this on the Request tab of the "View Results Tree" listener. Here it shows "[no cookies]". But using WireShark it is possible to see that the same request has been sent using the Cookies set on the previous request (which was on the previous iteration). System settings: OS: Mac OS 10.7.2 (Lion) Apache JMeter Version 2.5.1 r1177103 java -version java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03-383-11A511) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-383, mixed mode)
Thanks for the report. Forgot to disable automatic cookie handling in HC4 - oops! Now fixed: URL: http://svn.apache.org/viewvc?rev=1197164&view=rev Log: Bug 52126 - HttpClient4 does not clear cookies between iterations Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java jmeter/trunk/xdocs/changes.xml
Hi there, The issue has been fixed for domain cookies (cookie with a domain). For host cookies, the issue still persists even in the latest version JMeter 2.7. It does not clear host cookies (cookie without a domain) between loop iterations. It happens in all http client implementations: Java, HttpClient3.1 and 4. Please have a look. Thanks, Bryce
Hi, To avoid any confusion, we used Cookie Manager with a Loop Controller. It does not clear any cookies unless cookies are explicitly expired in a http response. It works fine with Thread Group - cookies are cleared properly for each loop iteration. Thanks, Bryce
Hello, CAN you attach à simple test plan showing issue ? Thanks Regards Philippe
(In reply to comment #3) > Hi, > > To avoid any confusion, we used Cookie Manager with a Loop Controller. It > does not clear any cookies unless cookies are explicitly expired in a http > response. > > It works fine with Thread Group - cookies are cleared properly for each loop > iteration. > > Thanks, > Bryce So I close issue as it is not related. I suggest you open a new issue as Enhancement saying: "CookieManager: Cookies are not cleared on iteration of LoopController" I made some tests and cookies are correctly cleared with or without domain when placed at Thread Group level and within iteration of Thread Group (as you say) Indeed they are not for iterations of LoopController which is not a bug request but an enhancement request that will or will not be implemented.
I believe such 'enchancement' has been already present in the 2.3.4, be it bug or a feature - if there arrived new cookie named the same as existing one, it was overwritten. So I suppose downgrading is a solution for those intrested in it as a feature.
(In reply to comment #6) > I believe such 'enchancement' has been already present in the 2.3.4, be it > bug or a feature - if there arrived new cookie named the same as existing > one, it was overwritten. If that is true, then it is a different issue. New cookies with the same name should replace existing ones. If that is *not* the case, please open a new Bugzilla with the details.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2633