Bug ID 557484: Setting the cookie expiration to 0 seconds with the 'HTTP::cookie expires' server-side iRule API fails

Last Modified: Feb 13, 2019

Bug Tracker

Affected Product:  See more info
BIG-IP LTM(all modules)

Known Affected Versions:
12.0.0, 12.0.0 HF1, 12.0.0 HF2

Fixed In:
12.1.0, 12.0.0 HF3

Opened: Nov 11, 2015
Severity: 3-Major
Related AskF5 Article:
K53912726

Symptoms

When the cookie expiration time is set to 0 (zero) using a server-side iRule, with the 'HTTP::cookie expires 0 [ relative | absolute ]' iRule API, the invocation fails, yielding the following error log in /var/log/ltm: TCL error: /Common/test-irule <HTTP_RESPONSE> - Illegal argument. Internal error - NULL argument (line 1) invoked from within 'HTTP::cookie expires <cookie-name> '0' absolute'.

Impact

On the client-side, the corresponding cookie entry has no expiration attribute.

Conditions

Using server-side iRule (e.g., HTTP_RESPONSE) with 'HTTP::cookie expires 0'.

Workaround

To configure 0 cookie expiration value, calculate the corresponding time-stamp and then use the following API to set the cookie expiration: HTTP::cookie attribute <name> value "expires" <time-stamp>. For example, to set cookie expiration to 0, specify the current time-stamp (for relative) or the absolute time-stamp corresponding to 0, which is 'Thu, 01-Jan-1970 00:00:00 GMT'.

Fix Information

The system now supports cookie parsing to set cookie 'expires' attribute to 0 (for example, through the 'HTTP::cookie expires' iRule API).

Behavior Change