Forum Discussion
praque_135655
Oct 28, 2013Nimbostratus
Hi Kevin,
Now cookie value returning from external url to current url using the following code.
when CLIENT_ACCEPTED { log local0. "enter client_accepted:" set cookie 1 set gotpath 0 set smsession "" set def_pool [LB::server pool] set sm 0
}
when HTTP_REQUEST { log local0. "enter http_request:: gotpath=$gotpath" if { $gotpath == 0 && $sm == 0 } {
log local0. "inside _Rachel_8080:" pool Rachel_test_8080 HTTP::uri /OAuthDemo/cookiegenerator.html log local0. "gotpath:::$gotpath;uri:::HTTP::uri /OAuthDemo/cookiegenerator.html" set request_headers [HTTP::request] log local0. "host:::[HTTP::host]" log local0. "request_headers:::$request_headers" set gotpath 1
} elseif { ([LB::server pool] ne $def_pool) } { pool $def_pool }
} when HTTP_RESPONSE { log local0. "http_response: cookie:=$cookie; status:=[HTTP::status]; sm=[HTTP::cookie exists "SMSESSION"]" if { ([LB::server pool] ne $def_pool) && [HTTP::cookie exists "SMSESSION"] } { set smsession "SMSESSION=[HTTP::cookie value SMSESSION]" log local0. "smsession$smsession" set sm 1
}
}
Regards, praque