People asked for cookie values to be available as JMeter variables, and
so we made it so.  

On Fri, 2005-10-21 at 16:23 +0100, sebb wrote:
> I've been looking at Cookie Manager, and found the following code:
> 
> 
> /**
>  * Add a cookie.
>  */
> public void add(Cookie c) {
> 
>     [snip]
>       JMeterContext context = getThreadContext();
>       getCookies().addItem(c);
>       if (context.isSamplingStarted()) {
>               context.getVariables().put(c.getName(), c.getValue());
>       }
> }
> 
> Why is the cookie defined as a variable?
> 
> The code seems to have been added in revision 323324 back in 2003.
> The comment says:
> 
> "Doc updates
> GUI update to User Parameters
> Update to jmeter-server script files to pass command line arguments on
> (allows setting proxy for server)"
> 
> Just wondering whether the code is still needed?
> 
> If so, do the variables need to be deleted when the cookies are
> deleted? Also, what about variable name clashes? Also it might be
> better if the cookie variable names were prefixed with "COOKIE." or
> somesuch.
> 
> [BTW, I'm thinking of replacing the low level cookie handling with the
> cookie code from Apache HTTPClient.]
> 
> Sebastian
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to