Forum Discussion
Biswajeet_38744
Nimbostratus
Apr 01, 2019HTTP XML irule based on string
Hi Team,
I need to write a irule for HTTP POST request with XML if matches string in between UE; the middle 2 characters direct traffic to pool1 or else pool2. Kindly suggest.
Thanks,
Biswa...
youssef1
Cumulonimbus
Apr 01, 2019Hi,
Can you try this simple Irule. We can add more info after testing (mimetype...)
when HTTP_REQUEST {
set capture 0
if { [HTTP::header exists Content-length] and ( [HTTP::method] equals "POST" }
set capture 1
HTTP::collect [HTTP::header Content-Length]
}
}
when HTTP_REQUEST_DATA {
if {$capture} {
if { [HTTP::payload] contains "UE<\/circle>" } {
log local0. "Logs: trigged wanted post"
}
}
}