On 2 June 2011 16:35, Bruce Ide <flyingrhenqu...@gmail.com> wrote:
> Jmeter's doing the right thing. If you're testing wordpress, file a bug with
> them and tell them to fix their thing. If you're running an application
> server yourself, I'd suspect it's something wrong with your application
> server config.

I'm inclined to agree - as far as I can tell, session cookies are
cookies without an expiry date or age.

> You have the jmeter source, you could always change its behavior to do what
> you want and recompile it. I'd start with CookieManager.java:
>
>        while (cookies.hasNext()) {
>            Cookie cook = (Cookie) cookies.next().getObjectValue();
>            final long expiresMillis = cook.getExpiresMillis();
>            if (expiresMillis == 0 || expiresMillis > now) { // only save
> unexpired cookies
>                writer.println(cookieToString(cook));
>            }
>        }
>
> Well there's your problem!

That only affects the cookies that are stored in the cookies file
(which is not normally used).

> I can't guarantee that's the only thing that
> prevents expired cookies from being sent. I suspect there's probably also
> some code in httpclient that checks to see if they're expired before sending
> them back.

Yes.
JMeter currently uses the Commons HttpClient 3.1 cookie handling code.

> I'd be really hesitant to change the behavior of the test environment to
> mask a bug you uncovered, though. Sending expired cookies IS a bug, and it's
> something the guys running the server should fix.

If this is a general problem, I suppose it might make sense to add an
option to remove the expiry date from stale cookies, turning them into
session cookies.
But AFAIK this is the first time this has been reported [, and might
cause indigestion (!) in some cases].

Note that cookies won't be handled properly if you have selected
"redirect automatically", because then JMeter does not see the cookies

> --
> Bruce Ide
> flyingrhenqu...@gmail.com
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org

Reply via email to