The HTTP Cookie Manager will not parse the response: Set-Cookie: myCookieName=; A browser will parse this and include the cookie 'myCookieName=;' in subsequent requests. Normally, this would not be a problem but this diversion in behavior (between JMeter and Browsers) actually caused me a few hours of confusion and I think that the correct logic would be to mimic browser behavior and send the cookie, even when it has no value. In addition. If I try to force a cookie with a blank value by adding the cookie to the HTTP Cookie Manager manually, this fails; when clicking away from the control the entry is not saved.
Hello, Is the behaviour with 2.6 the same ? Did you try all cookie policies and if not which one is failing ? Thanks Regards
Yes, same with 2.6 and yes, it's the same no matter which policy I tried.
Hi, Can you attach a screenshot of what you tried regarding this: "If I try to force a cookie with a blank value by adding the cookie to the HTTP Cookie Manager manually, this fails; when clicking away from the control the entry is not saved." ? Thanks Regards Philippe
Not sure a screenshot would capture the problem - it is the absence of something that is the issue! Maybe I can explain it better though. Essentially, the problem is that if I add a user-defined cookie without anything in the value field, then it is simply not saved. As soon as you click away from the HTTP Cookie Manager and return, the entry that was entered is gone. Steps to reproduce: 1. Add a HTTP Cookie Manager. 2. At the bottom of the form, Click Add. 3. Enter a name for the cookie. 4. Click away from the control and then click again on the Cookie Manager. The cookie previously entered is no longer present.
Hello Oliver, Regarding the issue you detailed in last comment, see bug 33796. This can be controlled by: CookieManager.delete_null_cookies=false Settting this value will not remove cookie. So I will close issue as worksforme, reopen it if you think it's wrong.
Ah ha! OK, yes, I can confirm this is the case. One comment though, to mimic the default behavior for Chrome (and I'm pretty sure all other browsers) would it be better to have this setting default to false, instead of true?
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2838