Forum Discussion
Guillermo_Ferna
Nimbostratus
Jun 15, 2015Read xml and redirect traffic
Hi, somebody can help me, I need read the value of a error in xml code, and with this information makes a traffic redirection, there is a sample of the code:
soapenv:Body>
error="0"><tx nbreq=1>...
Stanislas_Piro2
Cumulonimbus
Jun 16, 2015You can use a stream profile with this type of irule :
when HTTP_REQUEST {
Disable the stream filter for all requests
STREAM::disable
}
when HTTP_RESPONSE {
Check if response type is text
if { ([HTTP::header value Content-Type] contains "text/html" )
Match an http://*example.com string and replace it with nothing yet
STREAM::expression {&<\w* error=\"0\">&&}
Enable the stream filter for this response only
STREAM::enable
}
}
when STREAM_MATCHED {
Check if the matched string meets some condition that can't easily be checked for using a single regex in STREAM::expression
if {[STREAM::match] starts_with "Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects