'MalformedCookieException: Invalid 'expires' attribute
We are using header manager in our JMeter script and getting the following exception in one of the request responses. I tried with all the available options in the header manager but no luck.
Response from Server where it threw exception was- Set-Cookie: X-Region=B; expires=1581079580; path=/
I looked on multiple sites but no resolution. Could you please suggest a resolution for this exception-
org.apache.http.cookie.MalformedCookieException: Invalid 'expires' attribute: 1581079580 at org.apache.http.impl.cookie.LaxExpiresHandler.parse(LaxExpiresHandler.java:161) ~[httpclient-4.5.6.jar:4.5.6] at org.apache.http.impl.cookie.RFC6265CookieSpec.parse(RFC6265CookieSpec.java:181) ~[httpclient-4.5.6.jar:4.5.6] at org.apache.jmeter.protocol.http.control.HC4CookieHandler.addCookieFromHeader(HC4CookieHandler.java:125) [ApacheJMeter_http.jar:5.0 r1840934]
Solution 1:[1]
It looks like your 'expires' attribute is not compliant with https://www.rfc-editor.org/rfc/rfc6265 There is epoch time 1581079580 But there should be time in format specified by https://www.rfc-editor.org/rfc/rfc2616#section-3.3.1 E.g.: Wed, 09 Jun 2021 10:18:14 GMT Do you have a cookie policy set to standard or standard-strict (RFC6265)?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Community |
