rahulkotha07 opened a new issue, #6428:
URL: https://github.com/apache/jmeter/issues/6428

   ### Expected behavior
   
   - The HTTP Cookie Manager should be enhanced to:
                   1. Capture the expiry time from the Set-Cookie response 
header.
                   2. Store the cookie with its correct expiration time.
                   3. Automatically remove expired cookies instead of keeping 
them indefinitely.
   
   ### Actual behavior
   
   - The HTTP Cookie Manager automatically adds cookies when they are received 
through response headers.
   - However, once a cookie is set, it does not get removed even after it has 
reached its expiry time.
   
   ### Steps to reproduce the problem
   
   1. Setup HTTP Cookie Manager
   Open JMeter (or the relevant tool where the HTTP Cookie Manager is used).
   Add an HTTP Cookie Manager to the test plan.
   Ensure "Clear cookies each iteration?" is unchecked (so cookies persist).
   2. Send an HTTP Request that Sets a Cookie
   Create an HTTP Request to an endpoint that responds with a Set-Cookie header.
   Ensure the response includes a cookie with an Expires or Max-Age attribute.
   Example response header:
   - Set-Cookie: session_id=abc123; Expires=Wed, 19 Feb 2025 12:00:00 GMT; 
Path=/; HttpOnly
   Verify that the cookie is stored in the Cookie Manager.
   3. Wait Until Cookie Expiry Time Passes
   Manually modify the system time past the cookie expiry or wait for the 
expiration time to pass.
   Send another HTTP Request to the same endpoint without clearing cookies.
   4. Observe the Issue
   The expired cookie should be removed, but it is still being sent in 
subsequent requests.
   This indicates that the HTTP Cookie Manager does not remove cookies even 
after expiration.
   5. Expected Behavior
   The Cookie Manager should detect expired cookies based on the 
Expires/Max-Age header.
   Expired cookies should not be included in subsequent requests.
   
   ### JMeter Version
   
   5.7
   
   ### Java Version
   
   17
   
   ### OS Version
   
   Microsoft Windows 10 Pro Version : 10.0.19045 Build 19045


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jmeter.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to