Forum Discussion
Juerg_Wiesmann
Oct 27, 2013Nimbostratus
when CLIENT_ACCEPTED {
set cookie 1 set gotpath 0
set smsession ""
set def_pool [LB::server pool]
set sm 0
}
when HTTP_REQUEST {
if { $gotpath == 0 && $sm == 0 } {
pool Rachel_test_8080
[HTTP::uri] /OAuthDemo/cookiegenerator.html
set request_headers [HTTP::request]
if { [HTTP::header exists "Authorization"] } {
set authzheaders "Authorization: [HTTP::header value Authorization]"
}
set gotpath 1
} elseif {
$sm == 1 } {
pool $def_pool
}
}
when HTTP_RESPONSE {
log local0. "http_response: cookie:test22=$cookie; status:test22=[HTTP::status]; sm=[HTTP::cookie exists "SMSESSION"]"
if { [HTTP::cookie exists "SMSESSION"] } {
set smsession "SMSESSION=[HTTP::cookie value SMSESSION]"
set sm 1
}
if { [HTTP::status] == 404} {
HTTP::retry $smsession
}
I tried to format the irule a bit better, but it still dosn't make sense to me.