iRule to redirect users to a pool based on POST data
Gang,
I'm trying to direct a subset of my users to different pools based on their POST data. This is what I have thusfar:
when HTTP_REQUEST {
if { [HTTP::method] equals "POST" } {
if {[HTTP::header exists "Content-Length"] && [HTTP::header "Content-Length"] <= 1048576} {
set content_length [HTTP::header "Content-Length"]
} else {
set content_length 1048576
}
HTTP::collect $content_length
}
}
when HTTP_REQUEST_DATA {
if { (([HTTP::payload] contains "end-user=aaaaa") or
([HTTP::payload] contains "end-user=bbbb") or
...
...
...
([HTTP::payload] contains "end-user=zzzzz"))} {
log local0. "User redirected"
pool A_pool
} else {
pool B_pool }
}
This doesn't appear to be getting me the correct end-users hitting the A_pool.
Anything glaringly apparent to this group?
Thanks.
Joe