Persisting HTTPS traffic

We are trying to persist HTTPS traffic based on a Cookie called zdmSessionId. This is what the header looks like:

GET /login HTTP/1.1

Host: x.x.x.58

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Cookie: zdmSessionId=W+uhpsOgsMXWZMEJKXUE2twQBu3+xQ67T8F6ctTW; zdmIdentity=bob@bob.com; eabSessionId=6S04IvZpSFH6aXwWam8tK23ygXWecCZxsjE/+bmM

HTTP/1.x 200 OK

Date: Thu, 09 Nov 2006 17:44:31 GMT

Expires: 0

Set-Cookie: JSESSIONID=583keb0p5a001;Path=/

Set-Cookie: zdmSessionId=W+uhpsOgsMXWZMEJKXUE2twQBu3+xQ67T8F6ctTW;Path=/;Expires=Sat, 11-Nov-06 17:44:31 GMT;Secure

Set-Cookie: zdmIdentity=ckeith@talx.com;Path=/;Expires=Thu, 16-Nov-06 17:44:31 GMT;Secure

P3P: CP="NON DSP COR CURa

Pragma: no-cache

Cache-Control: no-cache, must-revalidate

Content-Length: 3221

Content-Type: text/html; charset=UTF-8

This is the irule that we are trying to use:

when HTTP_REQUEST {

set SessionId [HTTP::cookie zdmSessionId]

log local0. “Request SessionId is: $SessionId”

if { $SessionId != “” } { persist uie $SessionId }

}

when HTTP_RESPONSE {

set SessionId [findstr [HTTP::header Set-Cookie] “zdmSessionId” 13 40]

log local0. “Response SessionId is: $SessionId”

if { $SessionId != “” }{ persist add uie $SessionId }

}

The traffic is currently not persisting. We are logging in the irule, but nothing is being written to the log.

Any help would be greatly appreciated.