Aug 04, 2010
How to set/detect/read cookies on the client machine
Hello All,
I am trying to set a cookie and detect it on the client machine, but am having issues detecting the cookie. My goal is to send credentials over SSL and go back to HTTP after it's been validated. A couple of questions.
1) To set a cookie on the client machine, IRules must set the cookie on the HTTP_Response event, correct?
ex)
if { not ([HTTP::cookie exists "NAME"]) } {
HTTP::cookie insert name "NAME" value "cookie exist"
}
2) To check if the cookie exist on the client machine I would have to check cookie on the HTTP_REQUEST event, correct?
if { ([HTTP::cookie exists "NAME"]) } {
// 301 redirect
}
3) Are the JSESSIONID cookies set on the server as well? If so where do they usually live? We are using WebSphere.
Any help/direction is fully appreciated.
Regards,
TRX