Forum Discussion
hooleylist
Nov 15, 2011Cirrostratus
I wonder if this is a bug in the version of LTM you're trying with HTTP::cookie expires. Which LTM version are you testing on?
I just tested on 11.0 and 10.2.2 and both work as expected:
when HTTP_RESPONSE {
log local0. "Inserting PD-H-SESSION-ID"
HTTP::cookie insert name "PD-H-SESSION-ID" value test path "/"
if {[HTTP::cookie exists "PD-H-SESSION-ID"]} {
log local0. "Set-Cookie (pre): [HTTP::header values Set-Cookie]"
HTTP::cookie expires {PD-H-SESSION-ID} 30 relative
log local0. "Set-Cookie (post): [HTTP::header values Set-Cookie]"
}
}
And here's the log output:
< HTTP_RESPONSE>: Inserting PD-H-SESSION-ID
< HTTP_RESPONSE>: Set-Cookie (pre): {PD-H-SESSION-ID=test;path=/;}
< HTTP_RESPONSE>: Set-Cookie (post): {PD-H-SESSION-ID=test;expires=Tue, 15-Nov-2011 03:10:02 GMT;path=/;}
Aaron