0
votes

I have JMeter test where after one request in response headers is set cookie with Max-Age property.

In following requests I am sending cookie in request body.

After Max-Age time pass I expect that jmeter stops sending cookie in request body. But it stil sends cookie.

I am using HTTP Cookie Manager with Cookie policy: standard-strict

Am I using HTTP Cookie Manager right?

How Cookie Manager handles Max-Age parameter in set-cookie in response header?

2

2 Answers

0
votes

HTTP Cookie Manager doesn't send anything in the request body, it automatically parses incoming cookies and generates appropriate Cookie header

Looking into JMeter source code STANDARD_STRICT policy stands for RFC6265CookieSpecProvider with STRICT compatibility level

In its turn RFC6265CookieSpecProvider in STRICT mode invokes BasicMaxAgeHandler

So given you have HttpClient4 implementation of your HTTP Request sampler(s) (or even better in HTTP Request Defaults) the Max-Age check functionality should work (unless there is a bug in the HTTPClient itself)

enter image description here

0
votes

I listed all cookies with preprocessor and cookie has set expires property to 12:43:12 and current time is 12:45:35 (current time is in milliseconds) ... so it seems that cookie with expires property does not work

PreProcessor: Cookie n° 2: sticky_fo: http://10.64.128.238:30701 expires: 1611146592 Current time: 1611146735233